Skip to main content

New answers tagged

0 votes

QGIS How to calculate closest point referenced to centroid?

The expression inside the overlay_nearest function is "an optional expression to evaluate on the features from the target layer". So the centroid function inside the other answers is ...
Tom Brennan's user avatar
  • 5,249
1 vote

QGIS How to calculate closest point referenced to centroid?

You are conducting your overlay check on the polygons, not their centroids. Try changing the expression to make_line(centroid($geometry), closest_point(overlay_nearest('PUNTS_TEST', centroid($...
Erik's user avatar
  • 16.5k
4 votes
Accepted

Linking all possible polygons to point within a distance

You can buffer the polygons (or the points) and then spatial join. It should be very fast. import geopandas as gpd pointdf = gpd.read_file(r"C:\GIS\data\Bakgrundskartor\Topografi_250\data\...
Bera's user avatar
  • 74.7k
0 votes

How to run gdal_proximity in python rather than command line?

Probably the best docs are the C API docs for GDALComputeProximity CPLErr GDALComputeProximity(GDALRasterBandH hSrcBand, GDALRasterBandH hProximityBand, char **papszOptions, GDALProgressFunc ...
Mike T's user avatar
  • 42.2k

Top 50 recent answers are included