[OSM-dev] OSM without segments - prototype
Gabriel Ebner
ge at gabrielebner.at
Thu Aug 16 18:27:49 BST 2007
On Thu, Aug 16, 2007 at 05:32:19PM +0100, David Earl wrote:
> I think this would speed quite a lot of things up and improve integrity.
> But I'm worried we might have a lot to clean up manually.
There are just a few things that might need a clean up afterwards (or before):
1) Unwayed segments. Right now the migration script discards them, and you'll
end up with a bunch of nodes. Meybe I should just convert them to ways
consisting of 2 nodes.
2) Ways with segments pointing in different directions. Nothing is reversed
during the migration, so the way will be broken up and you'll have to combine
them later on.
3) Areas with holes implemented as noncontigous ways. The script breaks these
ways up. So right after the conversion these areas would be messed up. Maybe
the script should add an entity to hold them together? (But I think that
could get messy.)
> I think it would make a lot of sense to make this change at the same
> time as relationships/entities are introduced. Then we get only one hit
> on JOSM.
Seconded.
> > Migration should cope with all sorts of ways in the current database, but it
> > does not convert historical ways. Obviously it also deletes all segments and
> > their histories.
>
> Would we lose anything vital in tags on existing segments?
Yes. As of now, they're all discarded (including their tags). Segments
with tags and unwayed segments could be converted to 2-node-long ways pretty
easily.
> What do you do about the many ways which, though deprecated, have
> disjoint sequences of segments and/or unordered sequences of segments?
> Do you end up with two ways where there was one (good) or do you
> effectively end up with a connection between the disjoint pieces (bad)?
The algorithm goes about this rather conservatively. It just tries to stitch
existing segments together if they connect the same nodes, and if they don't,
you'll just get multiple ways.
BTW, are way ids important to preserve? Right now I try to preserve the id,
and if a way is broken up, the first part gets the id.
Gabriel.
More information about the dev
mailing list