A common GIS operation. Used to determine whether a point lies within a polygon's bounds.

learn more… | top users | synonyms

19
votes
2answers
5k views

Looking for fastest solution for Point in Polygon analysis of 200 million points

Apologies for asking a question that has been asked before -- I've read through answers, and I'm left wondering how to implement the recommendations. I've never used SQL, Python, C, and have only ...
6
votes
4answers
2k views

Point in polygon algorithm for multiple polygons

I've a Google map with bunch of polygons on it. Here is a problem I'm interested in: Given a lat,lng point, what's the best way to determine all the polygons that this point lies in? The obvious way ...
4
votes
1answer
1k views

STIntersects - Update field to give me count of points in polygon

I have a points layer (dbo.ptLayer) Around 1M points Spatial Geometry Type (dbo.ptLayer.geom) No spatial index just yet, but will create one once data gathering complete. I have a polygon layer ...
3
votes
3answers
723 views

In ArcGIS how can I append the number of points that are located inside each individual block groups of the entire US?

I am using ArcGIS 10 and I have 2 shapefiles; (a) a polygon shapefile of block groups of the entire US, (b) a point shape file of customer locations throughout the US. What I want to know if how many ...
2
votes
2answers
2k views

Is it possible to extract Coordinates of Polygon Centroid in QGIS?

I have created polygon centroids using one of the "Geometry Tools" but I would like to extract the actual coordinates into Excel for further work. Is this possible?
16
votes
2answers
4k views

How can I find a point inside a polygon in PostGIS?

How can I find a point that is guaranteed to be within a given polygon in PostGIS? I am aware of the ST_Centroid function. However, the centroid is not always within a polygon, see below: ...
6
votes
3answers
733 views

Overlay a spatial polygon with a grid and check in which grid element specific coordinates are located

How can one use R to split a shape file in 200 meter squares/sub-polygons, plot this grid (incl. ID numbers for each square) over the original map below, and evaluate in which square specific ...
5
votes
3answers
1k views

How to identify feature vertices that are part of a donut hole in ArcGIS 10?

I´m exporting the coordinates of polygon vertices to a CSV-File using the "Feature Vertices to Points" and then the "Export feature attributes to ASCII"-tools. Some of these polygons have holes ...
8
votes
2answers
2k views

Creating evenly distributed points within an irregular boundary

I need to create an evenly distributed series of points within a series of oddly shapped polygons (formerly squares, but now squares with donut holes). The way I have solved this problem so far is to ...
6
votes
1answer
1k views

Performance Gain Through GIST Index for Point in Polygon Query

I have two tables: locations(id,region_id,the_geom) and regions(id,the_geom). For each location point I want to determine the region it is located in: UPDATE locations SET region_id = (SELECT id ...
1
vote
2answers
615 views

Python - GDAL : Polygon to point shape file

I want to read all the points in a polygon shape-file and use their coordinates to make a new point shape file. then find the min and max of the X coordinates. So here is the code I wrote for the ...
1
vote
1answer
1k views

Count Points in Polygon with Postgis

I've got a simple problem: I want to count the number of points within a set of polygons. I have a SQL already but it only gives back the gid of the polygone that actually contains points. My ...
3
votes
1answer
60 views

How to create randomly points within polygons for each row of a dataframe matching a Polygon ID with R

My question is similar to this post, but because there are no "perfect" answer and above all no reproducible example I open this question. I have a "SpatialPolygonsDataFrame" and a data frame. Both ...
1
vote
3answers
389 views

How to create random point in according polygon for each dataset entry in a list (with R)

I have an area divided into polygons, and a dataset of observations which has a common field with the polygon layer. I now would like to generate a random point for each dataset entry within the ...
6
votes
2answers
4k views

Create a polygon layer from point data

I'm currently using QGIS 1.8.0 I would like to create a polygon layer from a point dataset, where the size of the polygons relates to the resolution of the grid reference. The ultimate aim would be ...
5
votes
2answers
2k views

Point-in-polygon using Python and OGR

I want to use OGR in Python to write a simple point-in-polygon test: def point_in_polygon(point, polygon): """ point : [longitude, latitude] polygon : [(lon1, lat1), (lon2, lat2), ..., ...
5
votes
2answers
541 views

Does anyone know a function to determine if a Point lies on a polyline?

ArcEngine 10 .Net 4 c# Hi I'm currently allowing user to select a point on a polyline and creating a point on the line. I am using snapping tool. I just want to make sure that when the user clicks ...
4
votes
2answers
902 views

Total of attribute field of point layer per polygon layer

I have a polygon shapefile of many lakes, I also have a point shapefile of locations on those lakes where fish were caught. The point shapefile contains the attributes: Fisherman_iD, Fish_Caught, ...
4
votes
3answers
6k views

Solving the Point in Polygon Problem Using Google Maps and Fusion Tables

The Point-In-Polygon problem is fairly well documented on this forum. My question is if there is a way to use Google's free tools, i.e. Google Maps, Fusion Tables, and possibly Google Refine, to solve ...
2
votes
3answers
956 views

Accessing coordinates of polygon

I have designed a polygon in a web page and the coordinates are stored in the database of the type polygon. However when I check the database, I find GEOMETRY - 120B under polygon field. What does ...
1
vote
1answer
49 views

Identify geographic location to points

I am quite new in QGIS and I really need your help. I have a map of Kenya divided into 68 districts and I have coordinates of 30.000 schools. The points have one variable besides the latitude and ...
1
vote
3answers
2k views

How to check if a point is near or inside polygon?

I am trying to find a simple library which can do point in polygon. Earlier i did hit Java Spatial Index library ...could not figure out. Tried openmap..looked simple didn't work. I am totally new ...