[geos-devel] ST_Snap

Martin Davis mtnclimb at telus.net
Thu Mar 1 20:08:26 EST 2012



On 3/1/2012 9:48 AM, Sandro Santilli wrote:
> On Wed, Feb 29, 2012 at 08:14:15AM -0800, Martin Davis wrote:
>> Snap-rounding is a well-defined technique for eliminating robustness
>> problems when overlaying arrangements of line segments.  The
>> original paper is by John Hobby; another good paper is this one by
>> Goodrich et al:
>>
>> http://www.ics.uci.edu/~goodrich/pubs/snap.pdf
>>
>> Google gives lots of references to various papers. As always, there
>> is a big gap between the papers and a practical implementation!
> Great, thanks for the link!
> My approach for the incremental topology creation is
> a first-come best-served one. Hot pixels are nodes by definition,
> every node of an existing topology is an hot-pixel there.
>
> But it's not easy to determine the grid size, which that paper
> is based upon, right ? How close should a segment be to a node
> in order to snap there ? In other words, how big is the hot pixel ?
Data-dependent.  I think you need to let the user choose.  You should be 
able to get away with 10 digits of precision.
>
> It'd surely be useful to let the user specify such grid (tolerance?)
> when invoking GEOS functions.
>
> It's also interesting to note that the floating point number grid
> is of variable size, with cells growing in size while moving away
> from origin.
Snap-rounding assumes a fixed-point coordinate system.  It's not going 
to be able to handle datasets with huge variation in scale.


More information about the geos-devel mailing list