Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [point-in-polygon]

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

1
vote
1answer
29 views

Check if point in GIS polygon fails to produce correct output

I've tried many, many many, ways to find out if a point is in a GIS polygon based on many great posts, but I can't get any to work properly. Specifically I created a grid of points covering the ...
0
votes
1answer
29 views

Check if a VERTEX of one polygon falls anywhere within the boundary of another polygon (in Python)

This is different than simply containing, overlapping, etc. For example, imagine a circle partially overlapping a square: The circle and square both overlap each other, both intersect each other, but ...
0
votes
1answer
66 views

Joinn shapefile attribute ID to point in R

I have a CSV file (about 1,000,000 georeferenced points) which contains point_id/latitude/longitude. I also have a shapefile which represents a grid cell_id/xmin/xmax/ymin/ymax. I am trying to join ...
2
votes
2answers
37 views

QGIS Points in a Polygon extract name information from Individual polygon

I am new to QGIS and need to know how to extract names and address' from the points in certain polygons. My main layer has all the points on the maps and then I drew the polygons on the map. I then ...
0
votes
1answer
73 views

Lines in Polygon Analysis

This question is similar to the "points in polygon" analysis, but I want to keep the attribute data for multiple lines within a single polygon. The data source is multiple line segments representing ...
0
votes
0answers
63 views

Finding out which U.S. state a tweet was generated in

I have a database of records with latitude and longitude information (imagine this is a CSV file containing tweets and their geo-coordinates). I also have shapefiles of U.S. states. I want to add ...
-2
votes
1answer
78 views

Stratified random point sampling in Python

I have a very basic knowledge in Python and arcpy. I want to create a stratified random sampling point on a continuous polygon. So far, I have dissolved the polygon (according to categories) and ...
2
votes
1answer
80 views

QGIS - count points in polygons

I use QGIS 2.18.26. I have a layer with 10 million location points over which I lay a 1m by 1m raster. Then I want to count the number of points in each 1m² of this raster. When I launch the count I ...
0
votes
1answer
16 views

Adding field of intersected polygons in points using ArcGIS Desktop? [duplicate]

I have some points and polygons in an area. I want to add a field in those points that tell what polygons have been intersected by those points and not only what polygons but a specific attribute of ...
0
votes
1answer
33 views

Joining data points to polygon using ArcGIS Desktop?

I have precipitation data points separately as a shapefile in one layer and I also have a polygon shapefile from where the precipitation data was collected. How do I join these two layers and compute ...
2
votes
1answer
53 views

Selecting points within polygon using ArcGIS Desktop?

I am using ArcGIS Desktop for the first time in many years. I have a postal sector layer under a series of merged drive time boundaries. How do I select just those postal sectors which fit within ...
1
vote
1answer
43 views

point.in.poly (spatialEco) returns non-intersecting points

I just updated the spatialEco package for R, and now the point.in.poly function behaves differently from previous behavior. Previously, it returned only points that intersected at least one of the ...
1
vote
1answer
78 views

Count points in polygon (weighted) for multiple attributes in QGIS 3 in one go

Is there a way to count weighted points inside polygons for multiple attributes at one time? I can count weight points (below) for an individual attribute, which creates a new polygon layer with an ...
2
votes
1answer
184 views

Count points in polygon (weighted) in QGIS 3

In QGIS 2 you could perform a weighted point within a polygon layer using Processing toolbox > Vector Analysis > Count points in polygon (weighted). I could well be missing something, but I can'...
1
vote
0answers
40 views

Generating defined rectangles (size, position) as a new shapefile layer in distance to specific points from another shapefile layer in QGIS

I'm familiar with the basics of QGIS, but now I'm confronted with a difficult task. I want to create a new shapefile (as a layer) which contains defined rectangles (size, position) from another layer ...
1
vote
2answers
63 views

Points in polygon doesn't count points [duplicate]

Using QGIS 2.18.17, I'm trying to count the points in this polygon but I'm not able to do it. What I have done: Loaded mapbox map (EPSG:3857) Loaded CSV-file with the points (EPSG:32633) Used ...
0
votes
1answer
280 views

Spatial joining/merging two spatial points data frames in R via buffer?

I'm trying to spatial join/merge two spatial points data frames in R. One data frame is lacking IDs, which is the information that needs to be joined to the other data frame. To be specific, any point ...
0
votes
1answer
125 views

Points in multiple polygons

I have two spatial objects, one polygon and one points. The polygons may overlap. I would like to associate each point with ALL the polygons it falls in. When the polygons do not overlap, I can do a ...
0
votes
0answers
170 views

Spatial analysis and parallel processing in R

I am trying to do a point-in-poly analysis using R. I have 4.5 million points and 5k polygons. This is computationally intensive. I was pointed to parallel processing through another post and tried to ...
0
votes
1answer
112 views

Counting points in polygon using QGIS?

I use QGIS 2.18.16. I import 1.000.000 data points, from a text document, as a CSV layer. Then I add a raster of 5 by 5m over those points. Project, layer and raster are put in the same CRS (...
0
votes
2answers
85 views

Combining attribute table of polygon and point shapefiles using ArcGIS Desktop?

I am fairly new to using ArcGIS Desktop. I am working with two different types of data. The first is a large shapefile that contains small polygons that distinguish different types of vegetation. ...
1
vote
1answer
673 views

python mask netcdf data using shapefile (xarray & geopandas)

I am using the following packages: import pandas as pd import numpy as np import xarray as xr import geopandas as gpd I have the following objects storing data: print(precip_da) Out[]: <...
1
vote
1answer
32 views

How can I do operations with points inside a buffer in GIS

I have a dataset with around 4k schools for with I have their location (longitude and latitude) and enrolment which I have uploaded to a GIS map. I want to do an operation with the competing schools ...
3
votes
1answer
106 views

Using python Point-In-Polygon operation to join grid with points based on points falling within grid?

I want to know how to select values from the xarray DataArray based on the location (geo_df.geometry) and time (geo_df.plant_date & geo_df.cut_date) of rows in the geopandas GeoDataFrame. I want ...
3
votes
1answer
151 views

Counting occurence of unique points across large grid using QGIS?

I am attempting to map out, in a 10x10 km grid, the occurrence of unique plant species. I have used the "Points in Polygon" feature to count and map the unique points across the grid, however I have a ...
3
votes
2answers
212 views

Using LAT/LON in Leaflet with Geoserver GeoJSON?

We're building a simple application that takes the result of a geococde and determines which school boundary the point resides. I'm trying to figure out if I should be doing this using a ...
1
vote
1answer
281 views

PostGIS speed up query

I know this question (or a version of it) has probably been asked but I cannot seem to figure out a solution to my problem. The core spatial operation is finding which of my points are inside ...
0
votes
1answer
67 views

Checking if point is contained by any geometry

I have a table of geometries (mixed MultiPolygons and Polygons), I want to check if a point is contained by any of the geometries in the table. I don't care about how many, nor I want to retrieve any ...
1
vote
1answer
178 views

OpenLayers - Dot Density map

I'm trying to create a dot-density map with OpenLayers (OL) and GeoServer. I've a counties shapefile and I'm creating a vector layer in OL with county shapefile set as source for the vector layer. I ...
0
votes
0answers
64 views

Assigning each point name of polygon in which it lies using QGIS?

I am completely new to QGIS, and to the world of shapefiles and GIS in general. I have the shapefile of a city, divided into its districts. On top of it I add a layer from a csv, with a certain ...
2
votes
1answer
102 views

QGIS 3.0.2 NNJoin doesn't complete. Crashes when close status bar

I have run a large spatial point to polygon join of 2 million points to 657 polygons. I used NNJoin so that the closest polygon will be assigned to a point if the point does not lie within one. The ...
2
votes
1answer
50 views

QGIS spatial query - points within certian elevation contour intervals

I'm struggling to find a way to identify all the points within certain contour intervals. I have a raster dataset that I generated a contour map from. Within the region of interest, I have a specific ...
4
votes
1answer
2k views

Detecting if GPS coordinates fall within polygon of points?

I'm looking for a simple explanation on how to detect if GPS coordinates fall within a polygon of points. I would prefer an explanations that can be done using paper and pencil and not programming ...
0
votes
0answers
35 views

Create polygon mask out of SAR Geom range azimuth coordinates

I have a SAR image, say s_img1, and a subset of min/max list of vertices as [(min_azimuth, min_range), (min_azimuth, max_range), (max_azimuth, min_range), (max_azimuth, max_range)] i.e they are a part ...
3
votes
1answer
337 views

Find if lat/long point is inside an area

I have got data using OpenStreetMaps Ways of many areas. I would now like to write a function which would return "true or false" if an single latitude/longitude point is found in that area or not. I ...
0
votes
1answer
128 views

Creating equally spaced points within shapefile with multiple polygons using QGIS?

In QGIS 2.18. I have a vector shapefile with multiple polygons, all of these are squared and have their own attributes. Inside these polygons I will have more (small) polygons that will represent ...
1
vote
0answers
35 views

ArcGIS JavaScript API find the polygon a point belongs

I have a shapefile containing polygons and whenever a user searches an address I store latitude and longitude of the location. I want to know which polygon this address belongs and I have id assigned ...
2
votes
1answer
201 views

count points in polygon returns wrong counts in QGIS 3.0.1

In QGIS 3.0.1, the vector analysis algorithm 'Count points in polygon' is returning wrong counts for some polygons. The counts returned for all of the polygons which do not contain any points appear ...
3
votes
2answers
174 views

Assigning projections in loop using R?

I'm using R to do some geospatial analysis. Basically, I am trying to solve for a method of doing poly.counts when my data is too large for my laptop (and R complains about the matrix being too large)...
0
votes
1answer
56 views

Finding area within set radius using QGIS?

I'm new to QGIS and I want to use it to model the land area within a 90km radius of a point. I have my location and I have 32 shapefiles and I would like to draw a 90km radius around my initial ...
3
votes
2answers
234 views

Auto-updating count of points in polygons?

I have a Point shapefile and a Polygon shapefile. Is it possible to create a field into the attribute table of the Polygon shapefile with the count of points inside each polygon, such that if I add a ...
0
votes
0answers
184 views

Adding to Redshift table of location polygon info

I'm data scientist and I haven't experience in spatial data. There is a task: add to Redshift (S3) data table of location points column with the name of the polygons in which the point lies. How to ...
1
vote
1answer
176 views

point.in.poly (spatialEco) in R doesn't add all attributes to points in the newest version?

Recently an update became available for spatialEco, an argument poly.id was added, allowing you to work NA's (after this discussion). For some reason the attributes from the polygons are no longer ...
1
vote
1answer
144 views

Using QGIS, automatically create n polygons fully covering an area without overlap with an approximately equal number of points in each polygon [closed]

I'm trying to avoid/simplify the following manual process intended to create a polygons layer with exactly n polygons so that each polygon encloses the same or close to the same number of points in an ...
3
votes
0answers
45 views

Dynamic filtering based on selected Layer in ArcGIS Desktop?

I am not sure this is even possible, I have about 38 geographical polygon layers showing areas of the UK, I also have a query (point layer) that shows all of the offices around the uk. What I am ...
0
votes
1answer
201 views

Optimal point distribution within polygons [duplicate]

I have a polygon and want to distribute a certain number of points within that polygon. The Points should have almost the same distance to each other and also to the boundary.
0
votes
1answer
511 views

Determining if point on boundary using shapely? [closed]

I'm new to Python, and I want to test if a certain point lies ON the (boundary) of a polygon - not inside, not outside, just if it's on the boundary. The points and polygon already defined polygon = ...
2
votes
1answer
226 views

STContains on SQL Server vs ST_Contains on PostGIS

I am trying to run a basic point in polygon query against a table of polygons. In PostGIS this works: SELECT * FROM schema.table WHERE ST_Contains( table.geom, ST_PointFromText('POINT(XXX.XXXXXXX ...
3
votes
1answer
47 views

One Record Two Point Geometries - Point-in-polygon

The trip data contains the origin-destination of each trip, and both origin and destination are stored as geometries. How could I retrieve the origin and destination polygons that the points are ...
3
votes
0answers
1k views

Using polygons to create mask on 2d grid with Python?

I have some polygons (Canadian provinces), read in with GeoPandas, and want to use these to create a mask to apply to gridded data on a 2-d latitude-longitude grid (read from a netcdf file using iris)....