[OSM-dev] Osmosis Output Error

Karl Newman siliconfiend at gmail.com
Tue Dec 9 22:57:20 GMT 2008

On Tue, Dec 9, 2008 at 2:40 PM, Andrew Ayre <andy at britishideas.com> wrote:

> Brett Henderson wrote:
>> Karl Newman wrote:
>>> So, sounds like the most recent changes are not the issue. Do you know if
>>> SRTM2OSM creates entities with negative ids? If not, you may run into
>>> collisions with the other data file that you're trying to merge.
>>> Karl
>> Andrew, it would be great if you could put your files online somewhere.
>>  I'll take a look this evening if Karl doesn't beat me to it.
>> My biggest concern at this point is that you don't appear to be getting a
>> decent error message.  Perhaps I'm losing an exception stack trace
>> somewhere.  It makes it hard to diagnose the problem.
>> Brett
> Karl - I'm not sure if SRTM2OSM produces entities with negative IDs. I'll
> try to check into that. But I think other people are doing the same thing
> I'm trying to do, making me wonder if I am doing something wrong here.
> Brett - I've uploaded the files to:
> http://files.britishideas.com/index.php?dir=osmosis/
> Note that I am running this on a set of 26 pairs of tiles. I get this
> errors on six of the pairs. The others seem to be OK, although I haven't
> rendered them yet to check.
> Thanks for the help! Andy

Looking at your source data (generated by srtm2osm), there are a couple
potential issues. The first is that the ids are not negative, although they
start at 1E9, so you probably won't run into a collision (I don't think the
new entity ids are anywhere near that yet). The bigger problem is that it
intermingles nodes and ways, and generally Osmosis works better if all the
nodes come first, then all the ways, then all the relations. For a merge,
they have to be sorted. That's easy enough to do, though--just add a --sort
task to your command line (for both input files). i.e., osmosis --rx
osmfile.osm --sort --rx srtmfile.osm --sort --merge --wx outfile.osm

In reality, maybe the problem is entirely with your osm data and not at all
with the SRTM. It's possible some of your osm data files have items out of
order, which is causing a problem with the merge.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20081209/4134bd3b/attachment.html>

More information about the dev mailing list