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.

275 questions
0
votes
0 answers

Could someone explain this Point in Polygon algorithm to me?

I understand how the PiP algorithm works on a high level, but I am having a little bit of a hard time understanding this implementation (from here) works, specifically what the math of second part of the if statement is doing. Thanks in advance for…
Jake S
  • 13
  • 2
0
votes
0 answers

Convert data frame to spatial object and find the polygon that contains a point

I have two data frames. The first contains the longitude and latitude coordinates for a series of locations. And it looks like this: The second data frame contains gridded data, the head is as follows. The longitude range is (-10.70, -5.35) and the…
aa3ls
  • 115
  • 4
0
votes
1 answer

Summ a Attribut from Points in a Polygon as Anotation in QGIS

I need a "LIFE" Annotation when end of digitizing a Polygon. I neend not the Summ of Points like this (array_length(overlay_contains('zensus_c40a84ba_3850_4f60_b02a_1df14041d205', $id))). This way or by trigger on the geopackage? Cont Points by…
geosnap
  • 11
  • 3
0
votes
0 answers

Should the winding number algorithm be able to detect edge points at a square?

I implemented the winding algorithm according to https://forums.codeguru.com/showthread.php?497679-To-check-if-a-point-is-inside-a-polygon. During testing I realized that it seems that an edgepoint of a square (so the polygon is a square) doesn't…
fnax8902
  • 13
  • 5
0
votes
1 answer

VB.NET - Point in Polygon From KML file

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 well as some other information i have regarding the polygon. My…
Carlo Prato
  • 326
  • 4
  • 21
0
votes
1 answer

find location in geoJson polygon

Hii I have a geoJSON file of an area (COLORADA) USA { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [ …
user15260712
0
votes
1 answer

How to create a polygon in postgresql

I have picked some random points from google map and wanted to create as a polygon, I have created a table and trying to create the polygon. CREATE TABLE public."place" ( id integer NOT NULL, polygon geometry(polygon,4326), count double…
Vicky
  • 51
  • 6
0
votes
1 answer

How to query points with a polygon layer using Bootleaf / esri-leaflet?

I am using the Bootleaf IAG framework. I can not figure out how to get the bounding coordinates of a filtered layer. I am modifying the bootleaf code to query points with a polygon layer. The Query Widget already allows users to draw a polygon, but…
0
votes
1 answer

type error in functions to run point in polygon query on RAPIDS

I want to create a point in polygon query for 14million NYC taxi trips and find out which of the 263 taxi zones the trips were located. I want to the code on RAPIDS cuspatial. I read a few forums and posts, and came across cuspatial polygon…
byc
  • 121
  • 10
0
votes
1 answer

Identifying if a spatial point is in a spatial polygon

here my R code link about coords of municipalita dataset with coords of stops I have a problem with my R code, because I have a error and I don't know how fix it. I have 2 datasets: a network of bus stops of a city (I have longitude and latitude…
0
votes
1 answer

Specific number of points within each polygon of a shape in R

I have a shapefile with around 400 polygons of different sizes. I have been trying to create a random point layer with a specific number of points within each of the 400 polygons. I tried with spsample function but it generates a random layer of…
Orlando G
  • 307
  • 3
  • 11
0
votes
1 answer

Use R to identify which counties are within larger congressional districts using sf

I have one sf object with US counties, and another with US congressional districts. I need to know (i) which counties are in which congressional district, and (ii) if one county overlaps the district boundary (i.e. is contained within two districts)…
0
votes
2 answers

gwt-g2d: How to detect if point is in shape?

I'm trying to detect if a point is within an gwt-g2d shape. Does anybody know how this is possible? I just can determine if the point is within any path in the context. Lets say I have a context with two rectangle (A & B) and want to determine in…
Wowa
  • 1,791
  • 1
  • 14
  • 24
0
votes
1 answer

Point in Polygon 3d (same plane) algorithm

I have a point and a polygon in the same plane in 3d space and now I want to check whether or not the point is in the polygon or not. Is there an easy way to change the algorithm from this thread Point in Polygon Algorithm to work for 3d space? Or…
Legatio
  • 259
  • 3
  • 9
0
votes
1 answer

Get multiple polygons for scattered data in R

I have point cloud data of an area (x,y,z coordinates) The plot of X and Y looks like: I am trying to get polygons of different clusters in this data. I tried the following: points <- df [,1:2] # x and y coordinates pts <- st_as_sf(points,…
Mansi
  • 313
  • 1
  • 5
  • 10