B4A Code Snippet Geo-Zone Determination (Point in Polygon) - Harris    May 27, 2015   (10 reactions) I use this in my app to determine if a vehicle is within a defined zone made of 5 or more lat/lon coordinates. Point 1 is also Point 5 (first point and last point are same value).
A simple box shows how to create this:
1----------2
| ........... |
| ........... | clockwise (or counter clockwise) B4A Class [B4X] GPSPolyMap - check if GPS location is inside a polygon - Biswajit    May 11, 2020   (19 reactions) With this class, you can check if the GPS location coordinate is inside a polygon.
You can use this class to check whether the user is inside a building, shopping mall or any custom shape.
This class is only for B4A and B4I.
Here is how can you get the coordinates of an establishment (school, offic B4A Library [BAX] [XUI] SD XUI_View3D - Star-Dust    Aug 18, 2023   (49 reactions) X2 As Float, Y2 As Float, Z2 As Float, BorderColor As Int, FillColor As Int()) As Object3D
Create Cube - Add 6 Polygon - Set Array as Color (min 1, max 6 Color)
AddCube(121,10,10,10,-10,-10,-10,xui.Color_Black,array as int(xui.Color_White))
AddCube(121,10,10,10,-10,-10,-10,xui.Color_Black,array a B4i Code Snippet Point inside a polygon (Ray casting algorithm) - marcick    Mar 23, 2016   (7 reactions) Based on this source http://rosettacode.org/wiki/Ray-casting_algorithm
I've adatped the code to B4i (should be identical for B4J and B4A too) and I want to share it in this so helpful forum.
You need to call the sub with a Point(LatLng) and a list(LatLng) that contains the sequence of vertex of the B4i Question iSVG Error - sorex (first post)    Feb 28, 2019   (2 reactions) 9 40 40-17.9 40-40 40-40-17.9-40-40z"/> <g fill="#fff"> <polygon points="24.7 48.3 28.7 27.6 22.2 27.6 21 34.2 14.9 34.2 16.2 27.6 9.77 27.6 9.77 27.6 9.77 27.6 5.81 48.3 12.2 48.3 13.8 40.1 19.9 40.1 18.4 48.3"/> <polygon points="54.3 27.6 50.4 48.3 56.4 48.3 60.3 27.6 54.3 27.6"/> <path d="m68.1 3 B4i Question problem with polygon - klaus (first post)    Aug 25, 2022   (2 reactions) I made a small test program with your coordinates to verify the calculation in Sub FindInZone.
The calculation is OK !
So the problem is somewhere else.
Therefore I checked further and I suspect that the problem is here:
If FindInZone(polxa,polya,Point.Latitude,Point.Longitude)=True
It should be:
I Bug? B4XRect .height changes when .top changes - William Lancee (first post)    Oct 18, 2022   (1 reaction) At the risk of extending this discussion beyond its usefulness, I would like to add this.
We will all agree that the position and shape of an object should be independent parameters.
A change in position should not influence shape and a change in shape should not influence position.
(Once I finish B4A Question Parse KML Polygones, Save, check if inside? - roumei (first post)    Nov 24, 2020   (2 reactions) I use this code to check whether a point is inside a polyon:
Type ePoint(X As Double, Y As Double)
Public Sub IsPointInPolygon(polygon() As ePoint, X As Double, Y As Double) As Boolean
Dim result As Boolean = False
Dim j As Int = polygon.length - 1
For i = 0 To polygon.length - 1
B4J Question [Geofence] Rectangle area, - Harris (first post)    May 30, 2022   (1 reaction) https://www.b4x.com/android/forum/threads/geo-zone-determination-point-in-polygon.53929/
Finding a point that is within a polygon.... if helpful....
This is a major function that runs every second within one of my apps to determine where the current user is located - and display on screen where h B4A Question Polygon calculation - klaus (first post)    Mar 21, 2016   (7 reactions) Attached you find a small project which returns if a point is inside the polygon, in the surrounding with a given distance or outsides the surrounding.
It is an evolution of this project.
The routine checks first if the point is in the polygon and then check if the distance of the point to the each Page: 1   2   3   4   5   6   7   Powered by ColBERT |