[postgis-devel] Tolerance (was: measures test fail)

strk strk at keybit.net
Mon Oct 18 08:43:16 PDT 2010


On Mon, Oct 18, 2010 at 03:42:58PM +0200, Nicklas Avén wrote:

> The more annoying result of this I think is that it is
> not possible to split a line with a point with the new st_split
> function. Even if you find the point to split with through functions
> like ST_Line_Interpolate_Point or ST_closestpoint.
> But I found no way to solve it. 

Yeah, split a line by point isn't really recommendable.
You should split by another line, or use a mixture of ST_substring
with your interpolate/closestpoint.

> This does not matter in most cases because no one measures distances in
> GIS in ten decimals anyway. 
> But in the case of ST_Split and ST_Intersects it can be quite annoying. 

ST_Intersects gives exact answers, problem is you can't give it
exact intersecting point...

That's where SNAPPING gets useful. If you snap your line to your point
everything should start dancing smoothly.

Only, we don't have snapping functionality exposed in PostGIS yet
(nor in C-API). Would be great being able to use it:

	SELECT ST_Snap(A, B)

Think also about the uses such a function would have for topology
building..

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list