[OSM-dev] Determining if two linestrings are "similar"

Martin Koppenhoefer dieterdreist at gmail.com
Fri Jan 4 20:04:33 GMT 2013


2013/1/4 Paweł Paprota <ppawel at fastmail.fm>:
> You have two linestrings and the task is to determine if they are "similar"
> or not. Similar means spatially "the same" as looked at by human eye at zoom
> level 18 on a slippy map :-)
>
> Note that the two geometries are not equal in ST_Equals sense. They don't
> have to intersect but can intersect or even be almost the same save for one
> node slightly moved.
>
> OWL right now shows some changes that in fact are non-changes - e.g. using
> simplify way feature of JOSM changes way nodes but preserves (or only very
> slightly changes) way geometry. It is not a change worth processing and
> showing to the user.


you can make a nice handmade geometry significantly worse with the
simplify function (e.g. in straight curves), and also moving slightly
one node of a rectangle makes things worse even if it does look very
similar in zoom18. Not sure what the purpose of your tool is, but I'd
like to see changes like this when looking for map modifications.

For the zoomlevel 18 choice: in dense old towns 18 is definitely not
enough and there is also some people acknowledging this by rendering
also in higher zoom levels (19 and maybe also above). Even more the
situation will change when many maps switch from prerendered rasters
to vector data  (rendered on the client), I'd expect this to come
rather sooner than later.

I think the idea to check for similar geometries is good, but I'd do
it less tolerant (e.g. on a zoom 22 tile it looks the same).

cheers,
Martin



More information about the dev mailing list