[OSM-dev] Osmium - "Corruption" when writing PBF
Pris Matic
prismatic.project at gmail.com
Wed Sep 21 05:57:15 BST 2011
Hi all,
I'm trying to use Osmium to read in OSM data from *.osm.pbf files, add
certain tag data and then write it out again to *.osm.pbf. I'm able to do
this with smaller files, (city level), but when I try to do state/provincial
level I run into 'corruption', where the tag data becomes completely mixed
up and unusable. It's a strange problem -- the tag keys and values are
'preserved', but they are all mixed, seemingly at random.
Here is an example:
way:
id=7948229
version=1
uid=5168
user=|43.637614,-79.424110|
changeset=505735
timestamp=2007-09-23T19:11:20Z
tags:
k=|43.208074,-80.002507| v=|Book Road|
k=|43.402130| v=|43.191320,-79.935827|
k=|43.398032,-79.793599| v=|43.191382,-79.935896|
k=|43.398144,-79.792577| v=|43.191420,-79.936025|
k=|43.398410,-79.791691| v=|43.191414,-79.936282|
k=|43.670969,-79.295439| v=|-79.936007|
k=|43.670595,-79.295294| v=|43.191384|
node_count=4
nodes:
ref=59222301
ref=59222588
ref=59222589
ref=59222590
I'm saving node geometry data for certain ways. Here's an example of what
the key/value pairs look like when they are correct:
way:
id=75168646
version=1
uid=5640
user=|MikeyCarter|
changeset=5631822
timestamp=2010-08-29T23:21:59Z
tags:
k=|my_startaddr| v=|724|
k=|my_street| v=|City Road|
k=|0| v=|48.354900,-89.284862|
k=|1| v=|48.356371,-89.279541|
k=|2| v=|48.356387,-89.279429|
k=|my_endaddr| v=|700|
k=|3| v=|48.356431,-89.277626|
k=|avg_lon| v=|-89.280365|
k=|avg_lat| v=|48.356022|
node_count=4
nodes:
ref=886971214
ref=887071818
ref=886990640
ref=887031646
However, at some point in the process, they will turn 'random' and become
garbage. I've been stuck on this issue for awhile, and I'd appreciate any
advice.
-Pris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110921/8e589f03/attachment.html>
More information about the dev
mailing list