[postgis-devel] Postgis "Split" with tolerance
Sandro Santilli
strk at keybit.net
Thu Nov 28 10:03:08 PST 2013
On Thu, Nov 28, 2013 at 05:22:11PM +0100, RĂ©mi Cura wrote:
> Hey everybody,
>
> again tolerance issue ! what ! ;-)
>
> In the liblwgeom.c file ,
> I changed
> "if ( dist > 0) /* TODO: accept a tolerance ? */"
>
> to
>
> //@TOTEST @CHECK change by Remi-C : adding a small tolerance
> vstol = ptarray_length_2d(lwline_in->points) / 1e12; //note : we don't
> really need to compute length, we could just compute
> //max (abs(max(x)-min(x)) , abs(max(y)-min(y)) ), it would be way faster
> if ( dist > vstol ) /* TODO: accept a tolerance ? */
>
>
> So know we can split a line by a point !
> Any thought?
Again, "accept" != "calculate".
I'm happy with exposing tolerance-computing functions, as I did
for topology with the _st_mintolerance or whatever I called it
(ok, that's not really "exposed"), but the point of that comment
is that ST_Split could take an optional tolerance from the user.
--strk;
More information about the postgis-devel
mailing list