point-in-polygon Questions

7

Solved

I need to create a numpy 2D array which represents a binary mask of a polygon, using standard Python packages. input: polygon vertices, image dimensions output: binary mask of polygon (numpy 2D a...
Travistravus asked 6/9, 2010 at 21:5

42

Solved

I'm trying to create a fast 2D point inside polygon algorithm, for use in hit-testing (e.g. Polygon.contains(p:Point)). Suggestions for effective techniques would be appreciated.

7

Solved

I'm trying to figure out how best to do this, I have a map with one Polygon drawn on it. Since it doesn't seem as though the Google Maps API V2 has a touch detection on a Polygon. I was wonder if i...

1

Recently I've faced with one little but majour problem: is point on the edge of polygon be inside polygon? What I mean - currently I am trying to implement 2D geometry library in JS for custom nee...
Antonyantonym asked 29/10, 2017 at 19:11

1

Solved

i have a big number of Polygons extracted from a KML file. The polygons represents "blocks" on the Earth surface. I can read the coordinates of the polygons and store their values, as wel...
Dundalk asked 11/10, 2021 at 9:40

4

Solved

I am using python and I have defined the latitudes and longitudes (in degrees) of a polygon on the map. My goal is to check if a generic point P of coordinates x,y falls within such polygon. I woul...
Oxyacetylene asked 10/5, 2017 at 12:24

3

Solved

Is it possible to determine whether a GeoJSON point at a given lat,lon lies within a given GeoJSON polygon using only JavaScript (either through d3, topojson, or any other way)? For example, I can...
Heterochromatin asked 19/11, 2015 at 11:7

5

I am looking for an algorithm through I can create a geofence and check if a device is entering/leaving the fence. I have looked at point in polygon algorithms (ray casting and winding number) but ...
Inception asked 1/6, 2012 at 18:41

8

Solved

i have a typical question with the Geometric datatype of mysql, polygon. I have the polygon data, in the form of an array of latitudes and longitudes, ex: [["x":37.628134, "y":-77.458334], ["x":3...
Thankless asked 21/2, 2011 at 10:50

2

I have a list of coordinates (latitude, longitude) that define a polygon. Its edges are created by connecting two points with the arc that is the shortest path between those points. My problem is ...
Saxophone asked 4/7, 2016 at 14:22

1

I am trying to check if the lat,lon is in the polygon or not. Here is my array : $vertices_x : Array ( [0] => -32.581189 [1] => -38.785885 [2] => -39.26384 [3] => -34.919383 [4]...
Drupelet asked 19/4, 2020 at 9:47

3

Solved

Suppose I Draw a polygan using leaflet like in the follow demo: http://leaflet.github.io/Leaflet.draw/ My question is how I can determine if a given point reside inside the polygon or not.
Emir asked 3/8, 2015 at 14:47

1

Solved

In my react application, I've drawn a polygon by using some points and then I'm trying to find out if mouse current location is inside the polygon or not. I'm using d3.polygonContains and passing i...
Sleep asked 23/9, 2019 at 6:2

2

Solved

I am using the Google Maps API on Android to create a puzzle. This link contains the data I used to draw African countries: World countries coordinates. When the user clicks on the map, a test is ...
Redistrict asked 17/12, 2016 at 21:25

2

Solved

I have create a table (municipal_border), in MySQL 5.5, that holds some boundaries. CREATE TABLE `municipal_border` ( `boundary` polygon NOT NULL, `municipalID` int(10) NOT NULL, ) ENGINE=InnoDB...
Phoebe asked 27/3, 2013 at 15:36

3

I have a problem I hope you guys can help me solve. I have got a DbGeometry point (or DbGeography, I can use both) and I would like to check if this is within a DbGeometry Polygon (alternatively a...
Excepting asked 19/12, 2012 at 20:46

1

Solved

I have a GeoDataFrame of polygons (~30) and a GeoDataFrame of Points (~10k) I'm looking to create 30 new columns (with appropriate polygon names) in my GeoDataFrame of Points with a simple boolean...
Procaine asked 4/1, 2018 at 14:48

1

I tried using the following code for the Even-Odd Rule from Wikipedia # x, y -- x and y coordinates of point # poly -- a list of tuples [(x, y), (x, y), ...] def isPointInPath(x, y, poly): num = l...
Ornamentation asked 6/1, 2017 at 12:3

1

Solved

I have the following POLYGON (in the image you can see the area it covers) POLYGON((-74.05100448502202 4.7239278424321,-74.05092938316898 4.7241416902206,-74.04830618275201 4.7237460717602,-74.0...
Feltner asked 19/9, 2016 at 21:12

4

Solved

I am testing the point-in-polygon function with matplotlib and shapely. Here is a map contains a Bermuda triangle polygon. Google maps's point-in-polygon functions clearly shows testingPoint and ...

1

Solved

I am trying to get the following code to draw a polygon on the map but for some reason it doesn't work. What did i go wrong here? import UIKit import MapKit class ViewController: UIViewController...
Jetta asked 16/7, 2015 at 4:40

1

I am trying to locate millions of points inside a half-dozen polygons. Here's my code: def find_shape(longitude,latitude): if longitude != 0 and latitude != 0: point = shapely.geometry.Point(lon...
Accipitrine asked 11/3, 2015 at 14:10

7

Solved

We need to figure out a quick and fairly accurate method for point-in-polygon for lat/long values and polygons over google maps. After some research - came across some posts about mysql geometric e...
Bentwood asked 27/9, 2011 at 18:22

2

Solved

I have a SpatialPolygonsDataFrame with 11589 objects of class "polygons". 10699 of those objects consists of exactly 1 polygon, however the rest of those objects consists of multiple polygons (2 to...
Faddist asked 23/2, 2014 at 17:8

1

Is there some library for node.js or javascript in general that provides a function to check if a coordinate is in a geojson multipolygon? I'm trying to create a small HTTP API that tells me which...
Plug asked 4/12, 2013 at 15:22

© 2022 - 2025 — McMap. All rights reserved.