Questions tagged [point-in-polygon]
A common GIS operation. Used to determine whether a point lies within a polygon's bounds.
465
questions
4
votes
1
answer
91
views
Fetching and combining field values from vector layer to another in QGIS
I have two different layers: one is a vector "polygon" layer, and the other is a vector "point" layer.
I have information (address and number) in my point layer that I would like ...
1
vote
0
answers
45
views
Error in finding a point within a GeoJSON file
I have a GeoJSON of all the marine zones of the world downloaded from the FAO (https://data.apps.fao.org/map/catalog/srv/eng/catalog.search#/metadata/ac02a460-da52-11dc-9d70-0017f293bd28). I want to ...
5
votes
3
answers
112
views
Counting points per category in polygons using QGIS
I am looking for a QGIS function to count specific point values inside polygons. I have a number of points, all sorted in specific categories "HOOFDGROEP" and a rectangular grid (see image).
...
1
vote
1
answer
55
views
Computation timed out on GEE API (Python)
I have a large set of points (with longitude and latitude) for which I need to extract the rasters (B1-B8A) in a CSV file. I am currently using geemap.extract_values_to_points.
geemap....
2
votes
1
answer
54
views
Raster R package, points outside the grid
I am posting my issue in this community as I did not get satisfying answers in stackoverflow, hoping to get a solution here.
I am working on a spatial simulation and I created spatial points, but when ...
6
votes
2
answers
158
views
Counting distinct values per polygon in QGIS
In QGIS I have a list of points, each with a town it's located in and a status, either 'new' or 'existing'. So something like:
ID
town
type
01
Alicetown
new
02
Alicetown
new
03
Alicetown
existing
...
4
votes
1
answer
169
views
Counting points in adjacent polygons using QGIS
I would like to sum up the amount of points in a polygon and its adjacent polygons. If possible, I would like to add a certain "weight" to the points of the adjacent polygons. Here is a ...
3
votes
2
answers
89
views
Counting points in hex grid by attribute in QGIS
I'm trying to count points within a polygon layer (hexagonal grid), grouped by an attribute of the points. There are some solutions on here (Python console, SQL virtual layer) but I can't seem to get ...
0
votes
0
answers
21
views
Converting data symbology from Fill to Marker
I'm new to QGIS and can't seem to find any way to convert data from "Fill" to "Marker" I have some data that I would like to overlay on a basemap as Markers which vary in size ...
4
votes
2
answers
132
views
Creating perpendicular line between two points inside polygon using PyQGIS
I'm looking for a solution in PyQGIS to create a cut line at the midpoint of another line that connects two points within a polygon. The objective is to cut the polygon into two parts.
In fact, this ...
5
votes
3
answers
208
views
Calculating statistics of points within polygons of the same criterion in QGIS
In my QGIS 3.10 Project, I have one polygon layer and one point layer.
Each of these layers has objects that belong to different categories based on some attributes: for simplicity, let's say RED and ...
0
votes
1
answer
85
views
Is the buffer distance the radius or diameter
I have created circles using the buffer tool ArcGIS Pro using point features. Is the distance specified when making a buffer the radius around the point, or is it the diameter? I have entered 1 meter ...
3
votes
1
answer
81
views
Numbering points that are contained in polygons in QGIS
In QGIS 3.16.8-Hannover I have a layer with polygons and I have a layer with points. Each polygon contains a certain number of points, I would like to assign a number to each point in sequential order ...
4
votes
1
answer
115
views
Creating iso-contours of cumulative values of overlapping polygons in QGIS
I start by drawing polygons by hand and assigning each polygon an attribute value for a frequency (or probability). What I then need is to create a heat map or iso-contours that show the cumulative ...
2
votes
1
answer
64
views
Showing full list of names of features within polygon when hovering over it in QGIS
In QGIS I've successfully joined three tables of data: 'Addresses', 'Persons', and 'Polygons'. The polygons represent the address on the map, and each address "contains" the names of all ...
4
votes
1
answer
421
views
Using sjoin in GeoPandas
I have a GeoDataFrame with 12.431 observations of geographical units, called "cities". I also have another layer file with points, called "points". Both of them are in CRS: ...
0
votes
0
answers
32
views
How to calculate if a pair of coordinates is inside a polygon without using an external library? [duplicate]
I have a latitude/longitude pair and I want to see if another latitude/longitude set comprising a polygon contains them. I once read (in this SE site if I'm not mistaken) that you usually need to take ...
3
votes
2
answers
60
views
Giving specific naming of points within quadrant in QGIS
In QGIS 3.18.1 I am doing sampling to estimate deer densities.
I would like to know which tool I can use to specifically name points within quadrants. There are four points in a quadrant, each point ...
2
votes
2
answers
57
views
intersecting_geom_sum function is no longer available in QGIS 3.22.12
When I was using QGIS 2.18.16 I could calculate the average values of points intersecting the grid with:
intersecting_geom_sum('Layer1', 'Value')/"Numpoints"
I had the plugin "...
2
votes
1
answer
172
views
Filtering points appearing in list of convex hull polygons
I have two DataFrames df & df1:
df: containing latitude, longitude, and binary cluster (0 or 1)
latitude Longitude cluster
30.400091 -100.722830 0
30.500091 -100.762830 0
30.600091 ...
3
votes
1
answer
85
views
Clipping point layer with polygon overlay using PyQGIS
The following script works just fine and as intended:
import processing
import time
start_tot = time.time()
path = 'C:\\Users\\tlind\\Dropbox\\Documents\\'
ext = ".shp"
municipalities = [...
3
votes
1
answer
231
views
Creating a dummy to identify if a point lies within a polygon using Python
I have two Geopandas (two shapefiles), one is a polygon type, and the other is a point type. I would like to create a new column in the geopanda of polygon type with a dummy variable saying 1 if there ...
1
vote
1
answer
304
views
Creating point grid over polygon boundary in Python / geopandas [duplicate]
How do I create a point_grid.shp over the extent of a polygon_extent.shp?
Spacing between the points must be in meters.
This is a pseudo-code adaptation of code found to create a polygon grid (I just ...
0
votes
1
answer
132
views
Create a polygon from WKT format in PyQGIS [closed]
I have a query file in WKT format that contain X and Y coordinate. I want to write code in PyQGIS to create a polygon shapefile from the query file.
0
votes
0
answers
51
views
QGIS count points in polygon by category
This question is following to this answer point count in polygon by category
array_length(overlay_intersects('pointlayername',$id,filter:="fieldcontainingcategory"='nameofcategory'))
This ...
1
vote
1
answer
165
views
Calculate how many points are located within certain land cover classes - QGIS [duplicate]
I am working on a project for my university and this is my first solo project.
I have two layers:
The first layer is a land cover classification with 6 classes.
The second layer is a set of points ...
0
votes
1
answer
92
views
Best and Fastest way to extract Polygon attributes of a Point [closed]
This is a comparative question, I don't know whether it is allowed to ask this type of Question here or not.
Problem: I have a shapefile of almost 1 million polygons with 20-25 attribute fields. I ...
3
votes
3
answers
233
views
Count points per polygon, classify point count in original layer in QGIS
I have a question that I believe is similar to Count points in polygon grouping by attribute using PyQGIS but not really the same, as I would like to do it without PyQGIS and also have the information ...
2
votes
2
answers
134
views
Automatic generation of attribute, taking the value from another layer in QGIS
I have points within different villages and I want to have the village name automatically be added to the point layer when I click within that polygon rather than using join by location or manually ...
1
vote
1
answer
2k
views
Check if a point is inside a GeoJSON polygon in Leaflet
I am trying to determine if a point is inside a GeoJSON polygon or not, using the Leaflet.PointInPolygon plugin. See example code below:
<script src="https://cdn.rawgit.com/hayeswise/Leaflet....
1
vote
1
answer
83
views
Counting points in a rectilinear grid efficiently
There are about a million questions on this website about counting points within polygons. There are also a few on counting points within a grid, but most of the answers use a count-points-in-polygons ...
0
votes
1
answer
279
views
How to create a regular grid with varying cell sizes for anonymising point data (ideally in Python/GeoPandas) [closed]
I have some point data that represents households and I would like to anonymise them so that you can't see which particular house a point relates to, but you can still know rougly where the house is.
...
2
votes
1
answer
341
views
Point vs Multipoint and table join using QGIS
I have to point some pottery on QGIS. The thing is that each pot has a key number but it may be found in more that one broken pieces (example: P234 has 4 pieces).
Should I add them on my floorplan ...
5
votes
2
answers
265
views
Getting part of polygon that is closer to point A than point B in QGIS
In QGIS I have a points layer and a polygon layer. Two of the points in the points layer lie within a polygon in the polygon layer. I'd like to generate a new polygon that includes all the parts of ...
1
vote
1
answer
48
views
Exporting data from points to a polygon
I'm new on GIS.
We were migrating from an old map program to QGIS.
My problem is that I need to have Polygons with data.
And I have the information that I need in the polygons in "entities" ...
1
vote
2
answers
124
views
Relationship by location in QGIS
I have two feature classes: point and polygon. The purpose is to make geometrical relations between them. For instance, if points are within a polygon then automatically make the relation between ...
7
votes
3
answers
402
views
Counting points that meet condition within polygons in QGIS
I want to create a dataset containing information about civilian deaths in areas near UNPKOs. Therefore, I use the Geo-PKO dataset, which geocodes UN peacekeeping missions, and the UCDP-ged dataset, ...
2
votes
1
answer
229
views
Getting coordinates from random points in polygon and sync it with shapefile in QGIS
In QGIS I have a shapefile that contains a polygon of administrative boundaries in a country. I need to add six random points inside the polygon.
Can i get the coordinates from random points feature ...
3
votes
1
answer
164
views
Counting all points in polygon where the name of polygon and point matches with SQL
In QGIS I have two datasets: (1) one with points that have two fields, the unique identifier "PK" and "species" - either H, L or G (2) second with polygons of areas, again with ...
6
votes
6
answers
661
views
Selecting only one point in polygon using QGIS
I have two shapefiles: polygon(buffer) and point.
How can I select only one point in each buffer in QGIS?
If I use the "Select by Location", I will get all points inside the polygons, ...
4
votes
2
answers
550
views
Calculating mean value for points within polygon in QGIS
I have square polygons that follow the route of a boat. There is also a point layer with different measurements like salinity, temperature etc. Sometimes there is only 1 point inside the polygon, but ...
2
votes
1
answer
672
views
Error when filtering spatial points dataframe: unable to find an inherited method for function ‘over’ for signature ‘"SpatialPointsDataFrame", "crs"’
I generated two spatial datasets: a SpatialPointsDataFrame and a polygon. The polygon should filter the SpatialPointsDataFrame, based on whether the points are in the polygon or not. However when I ...
3
votes
1
answer
84
views
PostGis - Split polygon into two based in point
How I split this single polygon into two polygons based on the point where there is an intersection?
3
votes
1
answer
140
views
Random Points in polygon not created
I have a polygon shapefile with a single object and I want to create random points in it. The tool 'random points in polygon' in QGIS does it job well for polygon 1, but doesn't create any points for ...
2
votes
1
answer
39
views
ArcGIS spatial joins: how many species are in an area as well as averaging enviro data (polygon+points)
I am trying to work out how many species are within certain boundaries (ie. states) as well as find the average of the environmental factors (like rainfall). I am using:
A map of Australia broken ...
0
votes
1
answer
149
views
Finding points from shapefile (residing in GeoServer) that are inside a provided polygon
I am new to GeoServer and spatial data. I have a shapefile "shape-file-2" in geo server which is a collection of Points. I am trying to fetch all the points which are inside a provided ...
1
vote
0
answers
195
views
QGIS. Combining points data on a map with attributes in polygons
I have a project where I'm trying to combine flood risk data to a list of postcode (/zipcode) data. The postcode data is a csv that contains each postcode's easting, northing, longitude, and latitude ...
7
votes
2
answers
308
views
Creating set number of regularly spaced points inside of polygon in QGIS
My application for this would be for making maps with pre-established plot points for cruising a stand of timber, but I could see this being used for other applications.
I am a little surprised that ...
6
votes
1
answer
121
views
Creating duplicate points as many times as it overlap with polygons in QGIS
Let's assume there two layers, see image below
a point layer 'random_points_test' with 10 features
a polygon layer 'test' with three features
I am trying to modify the number of features in the ...
1
vote
0
answers
189
views
Points in Polygon extraction
I have a shapefile with MSK-16z2 crs and a las-file which crs can not be recornized by qgis, but attached to the las prj contains also MSK-16z2. I need to crop described lasfile by shapefile. I tried ...