The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
2
votes
1answer
42 views

Add multiple points correctly distributed within a polygon

I'm a little new using QGIS. I know how to add random points within a geometry but how can I add multiple correctly distributed points within a polygon? Like this Not Like this
1
vote
0answers
34 views

Determine in Python if point is within a WGS84 polygon intersecting 180th meridian

I have a Python list of WGS84 points. Connecting these points together, we get two polygons on the WGS84 model of the Earth. I am interested in the smaller polygon which can possibly intersect 180th ...
2
votes
1answer
110 views

Counting number of points in each grid?

I would like to count the number of points in each cell. I have tried https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram2d.html but the out isn't appropriate. Does anybody know how I ...
1
vote
0answers
56 views

Can I make PostGIS treat polygon edges like Google Earth does?

Consider the following geographic polygon in PostGIS: POLYGON((60 -60,60 -50,179 -50,179 -60,60 -60)) The smallest latitude is -60, so initially I expected any point with a latitude less than -60 to ...
1
vote
1answer
32 views

Exracting data fromSpatialPolygonDataFrame conditionally in R?

For some research I am working on, I have a dataframe called charters of charter schools in New Jersey. Simplified it looks like this: school.name school.id district.id lat ...
1
vote
0answers
29 views

Point and Polygon Intersection [closed]

I have a .csv with a column for ID, latitude, and longitude, which creates points. I also have a .shp file which creates polygons of a parcel. I want to be able to attribute the polygon to the point. ...
1
vote
1answer
44 views

Point.in.polygon function in sf package miscalculate the distribution of points

I am using point.in.polygon function in sf package to determine whether a set of data fall within a polygon or not. Here is a snippet of the data and polygon visualization As the figure shows, there ...
2
votes
0answers
27 views

Using multiple fields for random points in polygons QGIS?

I'm quite new to QGIS and I have a question about the 'random points in polygons' functionality. Is it possible to use more than one field from the attibute table when using 'random points in ...
4
votes
2answers
82 views

Calculate the travel time from locations to the closest N points

I want to calculate the travel time (based on walking time) from locations to the closest N points of another dataset. Then I want to create a hull around those N closest points per location Is this ...
0
votes
0answers
18 views

Splitting a layer containing multiple polygons into multiple layers each containing one polygon [duplicate]

So firstly, I used the buffer tool in Qgis3 to create (twenty) polygons with a certain width from (twenty) points. This lead to the situation below, where o1 and o2 are two original points and 1 and 2 ...
1
vote
0answers
54 views

Does spatial indexing speed batch Point in Polygon

I have two tables, one with 66 thousand points and other with 5.5 thousand polygons. I'm trying to correlate which point is in which polygon and it is taking a long time. I want to know if spatial ...
0
votes
0answers
29 views

What analysis tool I can use to identify the relation between points and areas

I want a binary result for each purple point in this map, i.e. whether in or out od the blue polygon areas? In this case, one is in and the other is out. What analysis tool in ArcGIS Pro (also arcpy ...
0
votes
0answers
12 views

Assigning polygons to a feature class

I understand there’s a way or a program that can assign polygons (precincts) to a feature point.(Vote Centers) For insistence the law states we need to assign a maximum of 10 precincts (or polygons) ...
1
vote
1answer
115 views

MULTIPOINT Text to list of POINT objects

I need to convert a MULTIPOINT string to a list of POINT objects. For example, suppose I have a query with ST_AsText() producing an output that is captured in my_points: >>>print(my_points) ...
0
votes
1answer
62 views

Identify polygon grid in which the point belongs to?

I have a dataframe with 3 columns , which has my custom lat / long with a failure rate associated with each Lat / long head(df) Latitude Longitude Failure.rate 51.3 ...
2
votes
1answer
41 views

Spatial adaption of points to polygons [duplicate]

I have a point layer for the cold air flow in specific region. I would like to simplify all the single points to a polygon shape as to be able to join the data with other spatial data. My way is ...
0
votes
0answers
58 views

Identify features problem in QGIS

I am using QGIS 2.18 to identify points that fall out of a specific boundary but the identify features is not working. When I right click, it brings me the polygon feature. So i turned off the polygon ...
1
vote
0answers
91 views

Uncompressed vs Subdivided: which one offers better PostGIS INTERSECTS performance?

In my PostGIS I have a point table (roughly 51 millions rows) and a multipolygon table. I need to find a polygon label/ID for every single point in my point table (roughly 51 millions rows) in PostGIS....
2
votes
2answers
336 views

Combining st_join with st_nn to include all points within, as well as within a given distance of a polygon

This is a follow up to my earlier question (Spatial join in R - Adding points to polygons with multiple corresponding points). I have successfully joined a spatial points file to a polygon file in R ...
1
vote
1answer
67 views

Simple point in polygon query at PostGIS & PostgreSQL

Using PostGIS & PostgreSQL (Amazon RDS instance), I need to create a (quite large) table with points (just x, y coordinates) Then what I need to do is very simple point-in-polygon queries. Points ...
2
votes
1answer
62 views

Find a point in a multipolygon geometry

I need to know which points from Table 1 are contained in Table 2. In Table 1 I have longitude and latitude and I made points with ST_SetSRID(ST_MakePoint(d.longitude, d.latitude),4326) as geom ...
0
votes
1answer
43 views

Automatic polygonising in QGIS? [duplicate]

I have multiple points and I need to create polygons that consist specific amount of points. How could i do this?
1
vote
1answer
45 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
114 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
311 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
181 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
256 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
74 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
167 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
113 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
32 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
35 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
191 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
158 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
135 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
316 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
61 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
67 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
696 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
199 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 ...
1
vote
0answers
283 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
133 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
304 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
2k 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
35 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
184 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
323 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
257 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
475 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
84 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 ...