Hot answers tagged

5 votes

Rotating by 90° one and more polygons in QGIS

Try the "Rotate" tool. Rotates feature geometries by the specified angle clockwise. The rotation occurs around each feature’s centroid, or optionally around a unique preset point. Also ...
user avatar
  • 22.7k
5 votes

Finding change between two sets of polygon data in QGIS

Run Menu Processing > Toolbox > Geometry by expression with this expression with Input Layer the polygon layer representing the boundaries in 2020. In the expression at the end of line 2, ...
user avatar
  • 40k
5 votes

Selecting points which touch "boundaries" of another polygon using QGIS

You can use "Select by expression" via QGIS's Processing Toolbox (Ctrl+Alt+T) or attribute table (F6). Run it on your points layer and use this expression: distance( $geometry, ...
user avatar
  • 24.6k
4 votes

Selecting points which touch "boundaries" of another polygon using QGIS

Convert your polygons to lines Select by location, the buffers intersecting the lines (or Select within distance, your title says points but question body says polygons)
user avatar
  • 51.1k
3 votes

How to get a list of lines, with a list of polygons that they intersect?

This is generally solved using an [INNER] JOIN, or if you are also interested in lines that do not intersect any grid cells in the result set, a LEFT JOIN; you then want to GROUP BY your line_ids and ...
user avatar
  • 23.1k
3 votes

Appropriating ID for all lines inside polygon in QGIS

Open the attribute table of the line layer and create a new field or update an existing. Make sure it has the correct fieldtype. Since QGIS 3.16 you can then use this expression: array_first(...
user avatar
  • 24.6k
3 votes

Joining two polygons where they overlap the most in QGIS

Use QGIS expressions with this expression: array_first ( overlay_intersects( 'Districts', -- Replace with the name of the layer $id, sort_by_intersection_size:='des' )...
user avatar
  • 40k
2 votes

Adding lines to polygons in QGIS

Okay, so I believe I found the solution - thanks guys for the tip of using "geometry from expression", that was the ticket! Should anyone else get this problem: Firstly, I converted my ...
user avatar
2 votes
Accepted

Extracting polygon features based on single layer attribute polygons using ArcGIS Pro

Steps: Create a Spatial Join. Target Features: points - Join Features: polygons - Join Operation: Join one to many - Match Option: Within. Use the Split by attribute geoprocessing tool on the newly ...
user avatar
  • 673
2 votes

Looking for GeoPandas equivalents of PostGIS "ST_DumpRings" and "ST_Dump" tools

Try either .interiors: Returns a Series of List representing the inner rings of each polygon in the GeoSeries. .exterior Returns a GeoSeries of LinearRings representing the outer boundary of each ...
user avatar
  • 22.7k
2 votes
Accepted

Joining two polygons where they overlap the most in QGIS

Let's assume there are two polygon layers one called 'grid_test' (green) and the second called 'grid_test2' (orange), see image below. Apply the "Join attributes by location" tool with the ...
user avatar
  • 22.7k
1 vote

Unable to join data from another layer

If you want to join attribute data of one layer to other then you should use "Joins and Relates". Run the join command with "Join data from another layer based on spatial location"....
user avatar
1 vote

Unable to join data from another layer

If you only need the attribute table from one layer to another, "join attributes by location" function with "intersect" geometric predicate, should work. If each feature has it's ...
user avatar
1 vote
Accepted

Split Polygon in one layer based on boundaries in second layer

In the processing toolbox search for Polygons to lines and convert Layer 2 into lines, then search again for Split with lines, use the lines that you have created to split Layer 1.
user avatar
  • 4,388
1 vote
Accepted

Read geo-spatial data in R via Leaflet

Here's a sample sp-class points data frame in a projected coordinate system like your data is: > ps class : SpatialPointsDataFrame features : 4 extent : 1, 4, 1, 4 (xmin, xmax, ...
user avatar
  • 51k
1 vote
Accepted

Create sf polygon from sf linestring and bounding box

I suggest using lwgeom::st_split() to split your counties object according to the coast linestring. It will return a geometry collection, so it needs to be piped to a sf::st_collection_extract("...
user avatar
1 vote
Accepted

Using Shapely methods (explain_validity and make_valid) on shapefile

Two above method (explain_validity and make_valid) are applicable not to the shapefile itself, but to the objects (geometries of features) that it contains. To apply the explain_validity() method: ...
user avatar
  • 22.7k
1 vote

How to find which raster cells are overlapped by polygons

I'm pretty new at QGIS, but I went back and realized that different CRS files affects the rasterization compared to the cells of the background raster, so I went through and reprojected everything. ...
user avatar
1 vote
Accepted

CAD file to polygon Using feature to polygon

import arcpy land1 = r"C:\Users\Moayedian.MHD\Desktop\test1\6007-6-343\cad\land1.dxf\Polygon" output = r"C:\Users\Moayedian.MHD\Desktop\test1\6007-6-343\GiS\land1\new_land.shp" ...
user avatar
1 vote
Accepted

Parse GeoJSON polygons with holes library

I looked at this a few weeks ago on a separate platform: Here is what I said: Well, it looks like the multipolygons are incorrectly generated. From the spec, A linear ring MUST follow the right-hand ...
user avatar
1 vote

Extracting admin boundary data from OpenStreetMap

It depends how many boundaries you would like to extract from OSM. For single city shape osmnx would be easiest option. If you need to get admin boundaries for whole country, processing OSM data dump ...
user avatar
1 vote

Looking for QGIS equivalent of ArcMap's "Selection by Location" tool with "Have their centroid in" option

You can use multiple steps: Create centroids of the layer you want to select from Extract the centroids within the selection polygon layer Extract the polygons intersecting the extracted centroids:
user avatar
  • 51.1k
1 vote

Enabling "Snapping" in QGIS while drawing polygons?

In case anyone is wondering: you activated the snapping options when this toolbar appears.
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible