[postgis-users] Problem finding intersection of LineString and BOX3D?
Dave Blasby
dblasby at refractions.net
Fri Aug 16 11:58:15 PDT 2002
> I copied out my test case into a separate C program and managed to find the
> error in the truly_inside() function - you were right about the
> lineseg_inside_box() function. The problem I was having was with shallow
> horizontal lines and it was because the C-S algorithm only checks for
> intersections with the horizontal lines of the box. I modified the algorithm
> to include the vertical edges and now it works great every time :)
>
> Many thanks for your support on this one, PostGIS is a great piece of
> software and will only get better with technical support like this :) Please
> find enclosed the resulting patch against PostGIS 0.7.1 attached to this
> email for submission for the next release of PostGIS.
Thanks for the patch - I knew there was something wrong with it but
never fixed it because it was superceeded by the distance() function and
truly_inside() isnt an OGC function anyways.
You're right - it is difficult to debug postgresql modules because you
have to attach to the main server. I'll write a "debugging postgresql
code how to" and post it so other folks will know how to do it.
I've applied the patch and commited it to CVS so everyone can have
access to the new-and-improved function. Thanks a lot for fixing it - I
really appreciate it. It gives me warm fuzzies when people submit
patches!
dave
More information about the postgis-users
mailing list