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
3 votes
1 answer
72 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 ...
  • 479
1 vote
1 answer
24 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
34 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
31 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 ...
  • 371
1 vote
1 answer
62 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
42 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,043
3 votes
3 answers
165 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
100 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
205 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....
  • 475
1 vote
1 answer
66 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 ...
  • 476
0 votes
1 answer
142 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
70 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 ...
  • 21
5 votes
2 answers
242 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 ...
  • 51
1 vote
1 answer
45 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" ...
  • 13
1 vote
2 answers
90 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
322 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
73 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
119 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 ...
  • 31
6 votes
6 answers
529 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, ...
  • 580
4 votes
2 answers
302 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 ...
  • 121
2 votes
1 answer
313 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
63 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?
  • 63
3 votes
1 answer
86 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
37 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
100 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
100 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
199 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 ...
  • 71
6 votes
1 answer
91 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
1 vote
0 answers
132 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 ...
0 votes
0 answers
93 views

Looking for accurate point in polygon algorithm using WGS84

I'm looking for an accurate point in polygon algorithm using WGS84. The problem: Given the set of points that are the vertices of an arbitrary polygon drawn on the surface of the WGS84 reference ...
  • 1
9 votes
3 answers
418 views

Showing data from attribute table in legend in QGIS

I have multiple points with locations on a map and I want to calculate the exact number of points for a selected area. I created a polygon and with Numbers of points on the polygon I created a new ...
2 votes
2 answers
135 views

Automatically populating point layer with ID of polygon it intersects in QGIS

I am using QGIS 3 and trying to populate a column of a point file that has rare species data. One of the attributes is a Wetland "ID" column. If any of my rare species points are within a ...
  • 375
4 votes
3 answers
302 views

Skipping invalid geometries without fixing them in QGIS

In QGIS 3.16.14 I have a shapefile with multipolygons (flood risk map of the country) and another layer of points (buildings). I need to identify which of those points are inside those polygons and ...
  • 43
1 vote
2 answers
121 views

Number of points in polygon not equal in QGIS and Geopandas

I have polygons and points. What I do is a very simple operation - count points in the polygon. Primary I am working in Python, however I use QGIS to check and visualize the results. I have this code ...
  • 580
0 votes
0 answers
57 views

Selecting points inside of fishnet tile and adding its ID to points attribute table using ArcGIS Pro

Using ArcGIS Pro, I have uploaded a csv file containing GPS points and displayed it as XY Data. I have also created a polygon fishnet of 50x50 tiles. What I want is, for each tile of the grid, I ...
  • 29
1 vote
0 answers
100 views

How to perform intersect or overlay_within functions using Python/PyQGIS to circumvent graphical modeler limitations? [closed]

This relates to Creating field with 1/0 values depending if point sits inside polygon in QGIS for which people provided excellent answers but unfortunately highlighted a current limitation of the ...
7 votes
2 answers
335 views

Creating field with 1/0 values depending if point sits inside polygon in QGIS

I have a layer with a single polygon and a layer with multiple points. Some of the points are inside the polygon. How can I create/update a field with a value of 1 (true) or 0 (false) depending if a ...
1 vote
3 answers
225 views

Joining attributes in CSV by location using QGIS

I have a shapefile which divides Africa in cells of 0.5x0.5 decimal degrees. This documents provides the longitude, latitude of the centroid of the cell and a unique identified of each cell. On the ...
  • 479
6 votes
3 answers
104 views

Finding distance to points only outside of polygon in QGIS

I've tried using "Intersect" and "Join attribute by location" but these aren't achieving exactly what I'm after. I have a series of points inside and outside a polygon. My aim is ...
-1 votes
1 answer
720 views

GeoPandas Spatial Join of Points and Polygons returns NaN after projecting

I have an Excel file with some points (https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Energie/Unternehmen_Institutionen/E_Mobilitaet/Ladesaeulenregister.xlsx;jsessionid=...
  • 3
2 votes
1 answer
130 views

Updating field values if condition met, but leave the original values if condition not met in QGIS

I'm sure this is probably quite simple but I'm still learning the syntax for field calc expressions. I have a points layer with the field "Distance" that I want to update using my expression:...
3 votes
0 answers
45 views

R method for retrieving Polygon from GeoPackage that contains point [closed]

I have a polygon feature class and a point location and need to retrieve the polygon in which the point occurs. The feature class is in a GeoPackage and I am limited to using R. I can use any publicly ...
  • 645
3 votes
3 answers
314 views

Assigning point attribute to overlapping polygon in QGIS

Are there a way to assign the attributes of a point to a overlapping polygon? I got the data as lines and points. The lines are making the polygons and the points are overlapping the created polygon ...
4 votes
2 answers
104 views

Counting features of point layer that are laying within polygon layer using QGIS

I have a 'Layer 1' that represents geographical areas. And another 'Layer 2' contains some location-based information. I want to count/aggregate the tweets per geographical using QGIS. For example, in ...
3 votes
1 answer
116 views

Retrieving attribute field from polygon feature containing point feature in QGIS

I am trying to populate a point layer's field attribute with values from polygon features' attributes that contain point features. The inverse is very simple: aggregate( layer:='point layer's name'...
11 votes
2 answers
609 views

Applying labelling with obstacles in QGIS

I'm working with QGIS 3.16 Hannover and I'm quite confused with the option Features act as obstacles. According to QGIS documentation (13. The Style Library » 13.3. Setting a label » 13.3.2.3.4.4. ...
  • 2,452
1 vote
1 answer
261 views

Generating random points in polygons to simulate population distribution

I have a spatialpolygondataframe that represents census tracts. I want to simulate different scenarios of population density or distribution to test a model. To do this, I want to generate random ...
2 votes
1 answer
122 views

Calculating mean value of polygons based on attributes of point layer in QGIS

I am working with QGIS to compute the annual burned area of my study area in Chile. I have two different layers. One polygon layer which is a 1km x 1km grid of my study area. The only information ...
3 votes
3 answers
125 views

Visualizing points with different colours based on field from polygon layer in QGIS

I am aiming to create a map showing species location records as points. I need to make the points different colours based on land type which is a polygon layer. So I want my species points to be a ...
3 votes
1 answer
103 views

Creating different numbers of random points inside polygons using PyQGIS

I am developing a plugin using PyQGIS and PyQt5. I am calling qgis:randompointsinsidepolygons, where I am trying to give field input at VALUE parameter. It will take a variable number of points for ...

1
2 3 4 5
9