[gdal-dev] Snap point to vertex/segment
Even Rouault
even.rouault at spatialys.com
Wed Dec 10 13:56:18 PST 2014
Le mercredi 10 décembre 2014 22:28:48, Federico Jurio a écrit :
> Dear all, i'm trying to make a snapping tool to project new points in a
> layer to the nearest geometry. First of all, when i activate my tool i make
> a buffer of all the geometries in the layer. If the point that i'm trying
> to add in the layer is within the buffer i want to move this point to the
> nearest vertex/segment in that geometry but i don't know how to find the
> new coordinates.
> It would be helpful if someone could help me!
Frederico,
Available as ST_Snap in PostGIS (http://postgis.org/docs/ST_Snap.html), that
relies on GEOSSnap : http://geos.osgeo.org/doxygen/geos__c_8h_source.html
Would be easy to add in OGR geometry class as well (relying on GEOSSnap)
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list