[postgis-tickets] [PostGIS] #2192: Add tolerance parameter to ST_Split for splitting lines by points
PostGIS
trac at osgeo.org
Tue Jan 29 05:05:34 PST 2013
#2192: Add tolerance parameter to ST_Split for splitting lines by points
---------------------------------+------------------------------------------
Reporter: michischolz | Owner: pramsey
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS 2.0.3
Component: postgis | Version: 2.0.x
Keywords: st_split, tolerance |
---------------------------------+------------------------------------------
Heho.
ST_Split does not work well when splitting a line by a point. Consider the
following example where the line is not split even though the blade is
supposed to be a point on the line:
{{{
SELECT ST_AsText((ST_Dump(ST_Split(lin.geom,
ST_Line_Interpolate_Point(lin.geom, 0.5)))).geom) AS geom
FROM (SELECT ST_GeomFromText('LINESTRING(604630.408 5792499.778,604623.849
5792500.886)') AS geom) AS lin
}}}
For the case of a line split by a point some kind of tolerance parameter
would help. Until now I it is necessary first to ST_Snap your line to that
interpolated point before splitting it by the point, which is not
straightforward (thanks to strk for this hint). At least you could mention
this hint in the documentation.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2192>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list