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
B4A Class [B4X] GPSPolyMap - check if GPS location is inside a polygon - Biswajit    May 11, 2020   (19 reactions) B4A/B4I Usage:
Private PolyPoints As List
PolyPoints.initialize
PolyPoints.Add(CreateMap("lat":22.573515, "lng":88.371020))
PolyPoints.Add(CreateMap("lat":22.569855, "lng":88.370321))
PolyPoints.Add(CreateMap("lat":22.568923, "lng":88.375217))
PolyPoints.Add(CreateMap("lat":22.570707, "lng":88.37315 B4A Question Geometrical functions - Erel (first post)    Apr 07, 2020 https://www.b4x.-formulas.78449/#post-498431
Found it with: https://www.b4x./?query=inside+polyon B4A Question [SOLVED] Is it inside a polygon? - TILogistic (first post)    May 15, 2020   (1 reaction) Test:
https://www.b4x.com/android/forum/threads/b4x-gpspolymap-check-if-gps-location-is-inside-a-polygon.117625/#post-735898
and
https://www.b4x.-calculation.64819/#post-410936 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 Italian Che codice usare per capire se una locazione e' interna/esterna ad una zona irregolare? - LucaMs (first post)    Mar 07, 2022   (1 reaction) https://www.b4x.com/android/forum/threads/b4x-gpspolymap-check-if-gps-location-is-inside-a-polygon.117625/post-735852 Games Useful Formulas - stevel05 (first post)    Apr 20, 2017   (2 reactions) Is a point inside a polygon:
Converted from a C routine taken from here: http://www.codeproject.com/Tips/84226/Is-a-Point-inside-a-Polygon
There is an explanation of it's workings and it's license in the link.
Private Sub pnpoly(nvert As Int, vertx() As Int, verty() As Int, testx As Int, testy As B4J Question [ ABMaterial ] I've been trying to run my ABMateral-Project on the new IDE 9.80 - alwaysbusy (first post)    Apr 11, 2023   (2 reactions) Helper method AddPoint: public Sub AddPoint(markers As List, lat As Double, lon As Double, fencePolygonID As String) MarkerCounter = MarkerCounter + 1 Dim ll As LatLon ll.Initialize ll.lat = lat ll.lon = lon ll.PolygonID = fencePolygonID MarkersMap.Put("polygonmarker" & B4A Question Polygon Geofences - Troberg (first post)    May 12, 2015   (2 reactions) The algoritm for finding out if a point is within a polygon is pretty straightforward: Pick a point that you know is outside the polygon (such as the smallest X and smallest Y, both -1). Then, simply see how many polygon border lines a line between that point and the point you want to test intersec 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 |