# Geometry :

Subject: [ggl] Snapping
From: Stephen Leary (sleary)
Date: 2009-11-27 03:50:16

All of the above.

The way this is usually done (in GIS) is to have the entire portion of line
A that is within snapping tolerance of line B snap down onto line B.
Vertices are inserted n line A at all threshold points (points which are
exactly snapping tolerance from a line) and then all vertices within or at
snapping tolerance on line A get moved to the nearest point on line B.

There are exceptions for when two lines cross at close to 90 degrees.

Its a little odd and I admit and I didnt like it when i first encountered it
but eventually I was convinced of the business case for it,

I will definately try and find time to get some diagrams together,

Stephen

On Fri, Nov 27, 2009 at 8:43 AM, Barend Gehrels <Barend.Gehrels_at_[hidden]>wrote:

> Hi Stephen,
>
> OK, I'm curious. I didn't understand your diagram completely. You mentioned
> that another would come, one so didn't react on this earlier. I understand
> that you've two lines, and basically want to snap one line on another line,
> based on mutal vertex distances. Do you also snap between vertices?
> According to your diagram, yes.
> Do you also need to snap one line to multiple lines? Or more lines to
> multiple lines?
>
> Regards, Barend
>
>
>
> Stephen Leary wrote:
>
> Thanks Barend,
>
> I will do some simple snap tests at the weekend.
>
> Stephen
>
> On Sun, Nov 22, 2009 at 10:29 PM, Stephen Leary <sleary_at_[hidden]> wrote:
>
>> This is a very crude first attempt at a diagram (I will do another soon)
>> but the left hand scenario the line at an angle snaps to the other side with
>> the result being on the right.
>>
>> In GIS we usually have rules for what snaps to what. Most common new
>> features snap to existing ones.
>>
>> If we get this snapping in place it would allow us to do ISO 19107
>> topology further down the line.
>>
>> Cheers,
>> Stephen
>>
>> On Sun, Nov 22, 2009 at 6:48 PM, Barend Gehrels <
>> Barend.Gehrels_at_[hidden]> wrote:
>>
>>> Hi Stephen,
>>>
>>>
>>>
>>> You mean something like: ggl::snap(geometry_from, geometry_to,
>>>> snapped_geometry);
>>>>
>>>
>>> Something like that yeah. Most of the actual work involved is in finding
>>> points on a line that are at the snapping tolerance distance from "snap to"
>>> feature.
>>>
>>>
>>> Ah, of course, specifying a tolerance is essential :-)
>>>
>>>
>>>
>>>
>>> I'll have a look at the extension model then and see how this can fit.
>>> For me a snap feature is just as important as a "buffer" feature.
>>>
>>>
>>> OK, you'll need the account then, I'll send it to you privately.
>>>
>>>
>>>
>>> poly/poly breaks down to multiple line/line snaps. line line is a
>>> complicated beast because all parts of the line that are within a snap
>>> tolerance of the "snap to" line get snapped. I'll produce some diagrams of
>>> this and post them.
>>>
>>> I see. Points/lines might be snapped potentially to multiple lines or
>>> holes. I'll wait your diagrams.
>>>
>>> Regards, Barend
>>>
>>>
>>> _______________________________________________
>>> ggl mailing list
>>> ggl_at_[hidden]

>>>
>>>
>>
>>
>> --
>> Stephen Leary
>>
>
>
>
> --
> Stephen Leary
>
> ------------------------------
>
> _______________________________________________
> ggl mailing listggl_at_[hidden]http://lists.osgeo.org/mailman/listinfo/ggl
>
>
> --
> -------------------------------------
> Barend Gehrels
> -------------------------------------http://www.erplex.comhttp://trac.osgeo.org/gglhttp://www.geodan.nl
> -------------------------------------
> Geodan Holding b.v.
> President Kennedylaan 1
> 1079 MB Amsterdam
> The Netherlands
> -------------------------------------
> Tel: +31 (0)20 5711 335
> Mob: +31 (0)6 175 447 62
> Fax: +31 (0)20 5711 333
> -------------------------------------
> E-mail: barend.gehrels_at_[hidden]
> Kvk-nummer: 33 207089
> Disclaimer: www.geodan.nl/disclaimer
> -------------------------------------
>
>
> _______________________________________________
> ggl mailing list
> ggl_at_[hidden]

>
>

```--
Stephen Leary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20091127/2546c02d/attachment-0001.html
```

Geometry list run by mateusz at loskot.net