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
1
vote
1answer
413 views

How to determine if lat/long is within SABS school boundary?

I am an absolute beginner with GIS data. I am attempting to write a tool to determine if a lat/long point resides within a polygon within a shapefile provided by SABS (https://nces.ed.gov/programs/...
3
votes
2answers
2k views

Selecting polygons which contain at least one point with spatial index using PyQGIS

I have a points shapefile and a polygon shapefile. I would like to select all the polygons which have at least one point in them. The problem I'm running into is how long this takes. I have 1 million ...
1
vote
2answers
99 views

Number of point locations inside a shape?

I am pretty green with GIS, however: I have two data sets: a shapefile defining various exclusive populated areas. a text file defining the location of all telecommunications sites in a site I ...
1
vote
1answer
576 views

Point in Polygon QGIS 2.18 [duplicate]

Point in polygon does not appear in my QGIS 2.18.0 (Windows 10). The tutorials indicate I should find it in Vector -> Analisis Tools -> Point in Polygons, but it is not there. How should I install ...
3
votes
1answer
1k views

Determining which polygon(s) each point lies in using QGIS?

I am using QGIS software. I have shapefile layer of points and a shapefile layer of polygons(many of them overlapping). I need to determine which polygon(s) each point lies in. I tried "Join ...
1
vote
2answers
319 views

Create multiple random points based on attributes from a different shapefile

I have two shapefiles, one (Polygon A) is a fishnet of 1 square kilometer polygons, and the second (polygon B) is a multiple polygon with specific attributes. One of the attribute is the total number ...
-1
votes
1answer
572 views

Point-in-raster overlay? [closed]

I have an integer FGDB raster and a FGDB point layer, both in the same CRS/projection. I'd like to count the number of points that overlay each raster cell and then apply that count to the raster (...
3
votes
1answer
397 views

Point within a Polygon within another Polygon

I have a table with towns (polygons) and another with company assets (points). I am trying to get the town these assets are located in spatially. I have some point geometry that is contained within ...
1
vote
1answer
633 views

Count points in polygon by attribute column for making choropleth

I have a point shapefile of complaints for NYC. I also have a polygon shapefile of community district boundaries with an attribute column for the community district number. Is it possible to count ...
1
vote
1answer
171 views

Correctly setting up CRS systems for the NUTS (Eurostat) geographies and Doogal's data?

I'm interested in undertaking spatial matching in R with use of the sp package on some of the publicly available data consisting of: Polygons: Nomenclature of territorial units for statistics X/Y ...
3
votes
1answer
2k views

How to calculate whether a point is in a shape using geodetic calculations

I’m new to GIS so forgive me if my terminology isn’t completely correct. Really liking the options available in the GeoTools library but I’ve hit a stumbling block that I’m hoping someone will be ...
1
vote
2answers
669 views

Getting points in selected polygon

Anyone know of a way to be able to create a new shapefile of points that sit within a polygon, without having to trace along the boundary line to select all thousands of points? I used the "Count ...
1
vote
0answers
520 views

Find point in Polygon/MultiLineStrings with multiple interior areas, using Shapely and JSON

I've been working on this for a few days, adding in features, and fixing the problems as they crop up. The goal is to read in a CSV containing addresses for locates, parse/normalize them (that ...
2
votes
2answers
360 views

ArcMap - Python: Point in Polygon - within/contains function

I have one layer with polygons (say, countries) and one layer with x and y coordinates of points (say, cities). Now, for the city table, I want a new column giving me the id of the country it lies in....
2
votes
1answer
508 views

Joining 17 million points to one dissolved polygon layer taking over 24 hours to run!

I am trying to count how many points, out of 17 million, fall inside a polygon (see image below) which I created from dissolving various buffers and features. The polygon layer is thus one dissolved ...
10
votes
1answer
7k views

Counting points in polygons using QGIS

I want to count points (1000 of students home) in district polygons with Qgis 2.16. I didn't find the tool in the analysis tools plugin. Is there another plugin or method I could use to perform this ...
1
vote
0answers
62 views

QGIS Points in polygon - Difference between zero, and cells with no value?

I've carried out a points in polygon analysis. My output data contains the following results: PolygonID Point.Count 1 3 2 0 3 4 1 5 0 6 ...
0
votes
1answer
747 views

Testing if point inside multipolygon using PostGIS?

How do I know if a point (or a coordinate lon-lat) is inside of a MULTIPOLYGON using PostGIS? I tried with ST_Contains(), but being a MULTIPOLYGON always return False. Also I tried with ST_Dump() ...
0
votes
1answer
1k views

Point in bounding box using R?

Using the tz_world.shp file, I want to find the polygon in which a point falls. Technical details - language: R, v3.2.3; platform: Windows 7 professional (64-bit, quad core, 32 GB RAM). I have 12169 ...
17
votes
3answers
70k views

Check if a point falls within a multipolygon with Python

I have tried several examples of code using libraries such as shapefile, fiona, and ogr to attempt to check whether a point (x, y) falls within the boundaries of a multipolygon created with ArcMap (...
0
votes
1answer
132 views

Finding lat/lon point in coord polygon

I wrote a function to determine which ith polygon with coordinates contains a given lon/lat point, using the polygons from the tz_world.shp file. I pass in lon = -77, lat = 42, which is in New York ...
2
votes
1answer
834 views

QGIS Points in Polygon Query Not Working [duplicate]

I'm trying to count points within a polygon but it's not working. I think it has something to do with the co-ordinate system. The points are from a text file and the line are from a dxf file. I had ...
0
votes
0answers
4k views

Can Leaflet method .getBounds() be used on a layer to determine if a point is within it's bounds?

I am trying to determine if a set of points are within the bounds of a grid layer (specifically what rectangular cells are those points in) so I can highlight just those grid cells (or add a popup for ...
4
votes
0answers
473 views

How to create points along a polygon within a maximum distance from each other? [closed]

I'm looking for a tool that generate points within a polygon with a fixed-distance between point neighbors. I've tried Create Random Points, but the parameter is only minimum distance, and I was ...
1
vote
1answer
841 views

Point in overlapping polygons using R

I have shapefile with about 15,000 polygons. Some polygons overlap with other polygons. Most of them don't overlap with any other polygon. I also have a points data set with about 100 Million points (...
1
vote
1answer
2k views

Creating random points using density-QGIS

I'm trying to generate random points at a specific density within a polygon layer. The polygon layer has 1850 features and I'm looking to have random points within each feature at 1/meter. Going ...
1
vote
1answer
393 views

Creating boundary for multiple point shapefiles that overlay base polygon shapefile?

I have several point .shp files that were geocoded using OpenStreetMap. I located a base map to overlay the point files. I would like to create an artificial boundary based on an 80/20 rule for each ...
2
votes
1answer
321 views

Dealing with spatio-temporal data: sp::over function in R

I have a dataset called carcass, which contains occurrences of livestock carcasses in Norway in the last 5 years (each raw corresponds to a single carcass, which has an ID number, along with longitude,...
1
vote
1answer
517 views

SRIDs do not match for the two geometries in Oracle Spatial

I am trying to resolve where some points from Point Geometry lying outside the Polygon geometry. I want to filter those points which are lying outside the polygon geometry. I am getting error where ...
4
votes
3answers
6k views

Counting number of points within a grid

I'm trying to count how many floods occur within a given grid cell in ArcMap and I can't figure it out. I've been reading some other posts on here but I haven't been able to find an answer. I have ...
1
vote
1answer
125 views

Assign similar ID to points inside a polygon

I have 3 input datasets of points. What I'm trying to do is to assign a common ID code to the points that are close to each other (no specific distance). I'm using a ModelBuilder to achieve this : ...
1
vote
0answers
20 views

Mapping shapefile attributes to raw data [duplicate]

I have raw address data stored in a sql server database (2012) which comprises address, city/suburb, state and generally country (Australia). I would like to take this address data and following ...
3
votes
1answer
18k views

Checking if point is inside irregular polygon?

I'm using Javascript (https://github.com/substack/point-in-polygon) to test if a point is inside polygon, however I think it's adapted from https://www.ecse.rpi.edu/~wrf/Research/Short_Notes/pnpoly....
1
vote
0answers
253 views

Calculating the spatial variance of well density? [closed]

I have wells as a point shapefile and have calculated the spatial density of these wells in 400+ basins (polygons) by dividing the number of wells in each basin (found by doing a spatial join) by the ...
2
votes
1answer
2k views

Postgre/PostGIS - How to find points inside an area

I have a database of clients/users with their coordinates. I would like to select all clients within the marked area. Query: SELECT * FROM clients INNER JOIN polygons ON polygons.polygon @> ...
1
vote
1answer
780 views

Postgis bounding box intersect vs polygon intersect

I am running a point in polygon test for close to one billion points. The size of my polygons are very small (at about 12 vertices each polygon). Therefore, I would be satisfied even with a bounding ...
2
votes
1answer
2k views

Mapping Longitude and Latitude to US state

Is there any database (Gov data or private) or web service that map Longitude and Latitude to US state? I have the specific Longitude and Latitude of a location and would want to identify the state ...
4
votes
1answer
908 views

QGIS Points in Polygon Crashes (with data)

New to QGIS, using 2.14.0 on Windows 7 I am trying to run Vector -> Analysis Tools -> Points in Polygon... on these data. I want to get the PNTCNT and summary statistics on the Amount attribute. ...
9
votes
1answer
1k views

Optimising a very large point in polygon query

I have a national dataset of address points (37 million) and a polygon dataset of flood outlines (2 million) of type MultiPolygonZ, some of the polygons are very complex, max ST_NPoints is around 200,...
2
votes
1answer
484 views

Bulk loading into pyrtree index

I'm using pyrtree to create an index for a point in polygon operation. I am currently trying to insert 1.8 million rows into the index and it takes more than an hour to do so. I am unable to use rtree ...
3
votes
2answers
155 views

Total of several values in field for points within polygons

I have ~4000 insurance claims for a city. I have made a fishnet and would like to count the number of claims within each polygon. It is easy to count the total number of claims, but I would like to ...
1
vote
0answers
515 views

Need to highlight required area using leaflet [closed]

I need to display a polygon and highlight a city, I added the link bellow https://nominatim.openstreetmap.org/search.php?q=Bambalapitiya&polygon=1&viewbox= as nominant search I need to ...
4
votes
1answer
288 views

Add column to point data of whether point falls inside polygon

This seems like it should be fairly simple, but have been having quite a bit of trouble. I am no expert in ArcGIS for Desktop I have: one layer of points, and 4 polygons, which partly overlap I can ...
1
vote
1answer
389 views

Point in Polygon: Aggregation does not work

I'm working with these data: click here. The task is actually pretty simple but somehow it won't work properly. I have a point and a polygon layer. In most polygons there are a couple of points. The ...
1
vote
2answers
5k views

Point in Polygon - geojson - using Shapely / Python returning incorrect results

I'm trying to test if a point is inside a polygon using this example: https://stackoverflow.com/questions/20776205/point-in-polygon-with-geojson-in-python However, my output says that none of the ...
4
votes
1answer
3k views

Getting list of QgsPoint from polygon Layer in PyQGIS

How do I manage the points in a layer? from qgis.core import * def run_script(iface): layer = QgsVectorLayer(layerType.Polygon+'?'+crs.psg_4326, 'la-florida', ...
0
votes
0answers
171 views

Number of polygons in shapefile too high

I downloaded administrative shapefiles from www.gadm.com/country (China). The Python (Basemap) code below tells me that there are 2365 polygons in it. However the .csv and .dbf files included with the ...
4
votes
2answers
3k views

Spatial Join in R

I'm fairly new to using R for spatial work so bear with me. I have found questions similar to this but nothing that answers this question specifically enough for me to implement it. I have point data ...
4
votes
1answer
741 views

Count unique features of points in polygon

I have a series of points with various fields in the attribute table such as car_id, time etc., I've created a hexagon vector grid, I want to count how many unique car_id's occur in one of the ...
2
votes
0answers
49 views

Tool to help us re-district?

I work for a mid-sized school district and we unfortunately have to close one of our school buildings. That means that the neighborhoods who've been sending their children to the school that is ...

1
4
5
6 7 8