# Tag Info

1

Apologies for being vague, but this is a similar workflow i've used in ArcGIS and I'm sure it can translate to QGIS: Create a uniqueid for your Lakes Select by location Calculate code for Lakes Join uniqueid, code in new shapefile with Lakes uniqueid layer Export new Lakes Layer, delete uniqueid column Or create a python script/tool that will: Iterate ...

1

After much trial and error, I went for a Python script to solve my problem as I want to get the Longitudes of the crossings in between nodes rather than getting the closest node. In retrospect, I should have been more clear about that in my question. Here's my code: from qgis.core import * from qgis.gui import * import qgis.utils import numpy as np """...

1

You could calculate lat and lon as attributes in you shapefile and then use the "select features using an expression" tool. Important to make sure that the lat and lon are using the same precision and scale as the coordinate that you are searching for. Amended - included steps for using the "Select features using an expression tool" You mentioned in your ...

1

In order to calculate the angle P1-InterPoint-P2: Calculate the difference of the azimuths InterPoint-P1 and Interpoint-P2. Mind you that you have to investigate the azimuth according to the quadrant that it lies, so: if dx>0 & dy>0 : final azimith=azimuth if dx<0 & dy>0 : final azimuth=180-azimuth if dx<0 & dy<0: final ...

1

In PostGIS, if you just want the row number you can do this: SELECT row_number() over () as gid, sbqry.geom FROM (SELECT ST_Intersection(land_parcels.geometry, flood_zone.geometry) AS geom FROM land_parcels, flood_zone WHERE ST_Intersects(land_parcels.geometry, flood_zone.geometry) AND NOT ST_Touches(land_parcels.geometry, ...

1

You can also just use the Intersect tool with one dataset as input as explained in How Intersect works: Intersect can run with a single input. In this case, instead of discovering intersections between the features from the different feature classes or layers, it will discover the intersections between features within the single input. This can be ...

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