[gdal-dev] GDAL C++ Api, create new line segments from point layer

Jukka Rahkonen jukka.rahkonen at maanmittauslaitos.fi
Tue Mar 24 13:51:00 PDT 2015


ChiefDan <ChiefDan <at> gmail.com> writes:

> 
> Matt,
> 
> I've got a line layer and a points layer. The points layer fall on the line
> layer, however they are not end points on the line layer, for the most part.
> 
> I'm not sure if that answers your question or not.

Hi,

Could you make a drawing about what you have and what you want to get?

If your aim is to cut long linestrings only where they intersect with points
from the point layer I believe that it is not easy with plain GDAL. There
are some useful functions in the SQLite/Spatialite SQL dialect
https://www.gaia-gis.it/gaia-sins/xmlBlob/spatialite-sql-latest.html, like
LinesCutAtNodes and Snap if you lines are only close to vertex a a
linestring. LinesCutAtNodes is making multilinestrings so you should
continue with something like the -explodecollections option in ogr2ogr.

-Jukka Rahkonen-



More information about the gdal-dev mailing list