Skip to main content

Questions tagged [point-in-polygon]

Algorithm for determining whether a point is inside a polygon. Normally calculated by counting the number of polygon line segments that a ray from the point intersects.

point-in-polygon
2 votes
1 answer
51 views

Geography point within polygon showing incorrect results

In my database, I have a table containing a set of Polygons & their attributes and another table containing a set of points that have coordinates within the boundaries of those polygons. I've ...
Just_Some_Guy's user avatar
0 votes
1 answer
24 views

MySQL Distance from Point inside polygon to polygon boundary

I have a MySQL point inside a MySQL polygon. I need to know how close this point is to the boundary of the polygon. According to other related posts ST_DISTANCE only works with points outside of a ...
Jerry Malcolm's user avatar
0 votes
0 answers
46 views

PHP function check if Coordinates are inside a polygon defined by an array of coordinates

I have this function which check if coordinates passed as array e.g [42.4694321,-93.8159149] fall inside a polygon defined by a multidimentional array for coordinates as below: [ [ -96....
Benjamin Mwendwa Munyoki's user avatar
0 votes
0 answers
43 views

How to identify points in a Bitmap and compute distance between in C#?

Using VS2022. Trying to understand Machine Learning and processing of an image. Created a bitmap in MS Paint, with 3 small circles, filled in with black color, to simulate 3 points on a map. In one ...
user1007590's user avatar
0 votes
0 answers
25 views

How to judge a point is inside a 3D model (triangle set)?

I want to determine whether a point is within a 3D model, where the surface is represented by a series of triangles. Now, I use the ray method, which involves emitting a ray from that point and then ...
ZjuTh's user avatar
  • 13
0 votes
0 answers
39 views

Amazon Aurora Spatial Query Returning Duplicate Results Despite Unique Index

I am encountering a weird issue with a MySQL spatial query that is returning duplicate results, even though the selected column has a unique index. The query involves spatial function like ST_CONTAINS ...
Subhayan's user avatar
0 votes
1 answer
60 views

I'm trying to perform point in polygon analysis via turf, however it's consistently returning a ring undefined error

So, i'm building a react project as part of a code exercise. I've got a sheet of geojson data with various polygons defined within. I'm tasked with taking a pair of user coordinates and checking ...
TheFloof's user avatar
0 votes
1 answer
79 views

Point-In-Polygon boundary inclusive/exclusive

I'm trying to solve the point-in-polygon problem but I'm facing a problem where the lower bounds of the polygon are not included but the higher bounds do. I've been following the tutorial of inside ...
Zenz's user avatar
  • 1
1 vote
0 answers
32 views

Optimize search of a point(latitude,longitude) in a set of polygon(state polygon)

I stored the polygon data of all the states of USA in a custom object class StateDetails: state_name :str state_multipolygon :<class 'shapely.geometry.multipolygon.MultiPolygon'> Now I ...
G_1's user avatar
  • 11
0 votes
1 answer
126 views

Point in polygon is not performant using IndexedPointInAreaLocator and STRTree (JTS Topology Suite)

private List<ZoneDefinitionCacheMemory> findZonesForShipPosition(Point point) { List<Object> zoneDefinitionCacheHits = new ArrayList<>(); strTree.query(point....
Sunil Chormale's user avatar
0 votes
0 answers
48 views

Generating a grid of coordinates inside a polygon, each 1km apart

Given a polygon in JSON, I want to obtain a square grid of coordinates inside a polygon, each 1km apart. Here is a function that I've written, it's generating coordinates but in some situations I get ...
Sameh H's user avatar
0 votes
1 answer
186 views

Python shapely, incorrectly showing point inside/outside polygon

I am reading polygons from an ESRI Shapefile and I want to test if certain points (coordinates) are inside those polygons. I am using Pyshp to read the shapefiles and Shapely to check if the points ...
Mike Duke's user avatar
  • 133
0 votes
0 answers
61 views

Check if (pos/neg) polygon is inside another (pos/neg) polygon

Description I have the problem to decide if a region A is inside a region B. These regions are defined by a list of vertices polyA and polyB: If the vertices polyA are counter-clockwise, then A is ...
Carlos Adir's user avatar
1 vote
0 answers
33 views

Algorithm to find optimal pose of known polygon to cover a set of points

I have the following problem: Given a set of points S in the plane and a known polygon P, find the optimal translation (Δx,Δy) and rotation φ such that P translated and rotated by this transform ...
oarfish's user avatar
  • 4,406
0 votes
0 answers
32 views

Python to detect point in polygons

First I import a shapefile import geopandas as gpd shapefile_path = "data/TRI_75_SIG_DI/TRI_PARI_SIG_DI/n_tri_pari_carte_inond_s_075.shp" gdf = gpd.read_file(shapefile_path) And it works ...
John Smith's user avatar
  • 1,640

15 30 50 per page
1
2 3 4 5
19