Questions tagged [point-in-polygon]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
2k views

Calculation of average point distances from one another within a polygon grid

I am working with processed LiDAR data of forested areas in ArcMap 10, with various area based statistics extracted for each 30x30m polygon grid-cell in a shapefile. There are approximately 20,000 of ...
2
votes
3answers
4k 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 ...
35
votes
2answers
16k views

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

I have a CSV containing 200 million observations with the following format: id,x1,y1,x2,y2,day,color 1,"-105.4652334","39.2586939","-105.4321296","39.2236632","Monday","Black" 2,"-105.3224523","39....
12
votes
3answers
17k views

Getting point attribute from polygon layer using QGIS

In QGIS I have two layers: (A) has point features and (B) has polygons. How do I produce a new table with some (the "ID") or all the fields from the 'A' table and some (the area code) or all ...
7
votes
2answers
8k 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), ..., (...
0
votes
1answer
1k views

CenterPoint of Polygon in ArcEngine .Net 10

I am currently trying to get the center point of a polygon. In GIS, i can see the "x" mark in the center of the polygon, but I do not know how to get it from the IPolygon object. I tried getting the ...
3
votes
1answer
1k views

Correct way to perform point-in-polygon queries on streaming point data?

Short version: What is the "correct" Esri-based solution to the presumably-common scenario of receiving dynamic asset location data (eg. aircraft), checking to see whether those points are within any ...
11
votes
3answers
5k 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 ...
3
votes
1answer
5k views

Determining if mouse click falls within polygon using ArcObjects?

I have a polygon drawn on top of a layer using the graphicsContainer of the current activeView, then I want to be able to show a custom context menu if the user right clicks INSIDE the polygon. So I ...
19
votes
7answers
3k views

Fastest way to spatially join a point CSV with a polygon Shapefile

I have a 1 billion point CSV file and a shapefile with around 5,000 polygons. What would be the fastest way to spatially join points and polygons? For each point, I need to get the containing polygon ...
10
votes
1answer
3k 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 ...
3
votes
3answers
843 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 two shapefiles; (a) a polygon shapefile of block groups of the entire US, (b) a point shapefile of customer locations throughout the US. What I want to know if how ...
5
votes
3answers
1k views

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

ArcEngine 10 .Net 4 c# 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 on ...
6
votes
2answers
2k views

Creating polygons from one to many relationship of points using QGIS or PostGIS?

I have a set of polygons that are in a one to many relationship with points. The polygons are administrative boundaries and the points have information on companies and percentage of ownership . I ...
8
votes
3answers
6k 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 ...
4
votes
2answers
27k views

Selecting points under polygons using ArcGIS Desktop?

I have a point layer and a polygon layer (created from the point layer using local convex hull isopleths). I would like to be able to select only those points laying within the multiple polygons (all ...
12
votes
1answer
560 views

Spatial operators in R?

How can I do spatial selections or filters in R? I can do this in PostGIS using (e.g.): SELECT * FROM mypoint, mypoly WHERE ST_Within(mypoint.geom, mypoly.geom); and it is similarly a piece of cake ...
4
votes
1answer
587 views

Convert Landmask file into WKT Polygon

I have a land mask file in netCDF (also in ascii, if needed) which basically consists of a lat/long pair and a boolean (1 or 0) determining if that value is over land or not. The thing is, I'm not ...
37
votes
10answers
11k views

Creating regular point grid inside polygon in PostGIS

How to create, inside a polygon, a regular grid of point spaced x,y in PostGIS? Like the example:
1
vote
1answer
181 views

Find out if a point exists in an irregular shaped ILayer

Assuming I have an layer from a shapefile which is not shaped like a rectangle how would I determine if a point lies within this layer?
24
votes
2answers
11k 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: ...

1
4 5 6 7
8