0

I have a spatial db with links,nodes,traffic restriction etc.. I want to convert those spatial data to osm.pbf ,I know some osm.pbf from https://wiki.openstreetmap.org/wiki/PBF_Format structrue,like Node ,Way,Relation.

message Node {
required sint64 id = 1;
// Parallel arrays.
repeated uint32 keys = 2 [packed = true]; // String IDs.
repeated uint32 vals = 3 [packed = true]; // String IDs.
optional Info info = 4; // May be omitted in omitmeta
required sint64 lat = 8;
required sint64 lon = 9;
}

I use java and pfb tool convert the message to java class,then I create pdf file. Where is the ChangeSet message I can't find it anywhere.

  • 1
    Better use some existing library like osmium, or osmosis for this task. Also, it's not really clear why you need a ChangeSet message, and what purpose you're creating the pbf for (it's not p**d**f). – mmd Jul 13 '18 at 10:48
  • oh,my fault.I'd like to convert some custom oracle spatial data to osm.For example a link table has a linkid,two nodeid(start_node,end_node) and geometry column.Node table has a nodeid and the form of the node.Restriction table has a link-node-link relationship represent traffic restriciton like no-left-turn.I want to use some APIs or jar of GraphHopper so I need to convert the data into OSM PBF. – john strong Jul 16 '18 at 01:45
  • Hmmm.. I'm not aware of any API in the OSM ecosystem requiring PBF as input format. In any case, take a look at libosmium (https://github.com/osmcode/), and use either C++, python or node.js to read your source data format and create some osm.obf. As a reminder, you _cannot_ upload such data to OSM as is without prior consultation with the community (see mechanical import guidelines). – mmd Jul 16 '18 at 19:20

0 Answers0