[Potlatch-dev] P2, snapshot-server, imports, vector layers and more
Andy Allan
gravitystorm at gmail.com
Thu Nov 15 10:49:09 GMT 2012
On 15 November 2012 05:44, Paul Norman <penorman at mac.com> wrote:
> The
> additional attribute prevents the files from working in JOSM
Oh, really? That sucks. I went for the additional attribute because I
expect XML parsers to ignore it if they didn't understand it.
> but the bigger
> issue is the use of positive IDs. When an object is merged in JOSM it
> carries over its ID if it's a positive ID. This would lead to conflicts with
> existing data in the API. Even if JOSM were patched to allow it to work with
> these files and special-case their positive IDs, using positive IDs seems
> like a recipe for disaster, particularly when a standardized format exists.
Well, I wouldn't say that negative ids are standardized, just that p2
and JOSM use the same convention. I believe Merkaartor uses guids as
placeholder ids, in contrast.
Additionally, negative ids for background layers don't seem like the
right solution to me, because that still gives a shared id space. What
happens if you have three background layers, each with a node id="-1"?
Or you create a new way in the main layer, and then pull through a way
with a matching negative id?
Potlatch approaches this in a "more correct" fashion. Each vector
layer has its own id space. When objects are copied to the main layer
their ids aren't carried over - the main "osm" layer creates
corresponding new entities, copies attributes, and takes care of the
placeholder id assignment. I suspect JOSM will need to handle things
in a similar manner. The "recipe for disaster" of using positive ids
in vector layers is, as I see it, due to JOSM assuming that all the
different layers are in the same id space.
So does snapshot-server serving negative ids actually solve the
problem, or will it still lead to id space conflicts?
Cheers,
Andy
P.S. I don't think there's actually any osm_id handling code in
snapshot-server anyway, it just uses the same ids as are in the .osm
file in the first place.
More information about the Potlatch-dev
mailing list