Convert OBF to OSM or Shapefile

3,242 views
Skip to first unread message

Lelo Neto

unread,
Oct 3, 2013, 10:30:28 AM10/3/13
to osm...@googlegroups.com
Hello Osmand folks,

Has anyone ever converted OBF format file to OSM or ShapeFile? 

Can anyone give me some tips how can I do this?

Thanks so much,


Andre

unread,
Oct 3, 2013, 10:37:10 AM10/3/13
to osm...@googlegroups.com

Obf is created from OSM files or pbf files. These files can be downloaded from geofabrik or Cloudmade. I have seen you can also download shapefiles there.

Op 3 okt. 2013 16:30 schreef "Lelo Neto" <marcoaur...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

john whelan

unread,
Oct 3, 2013, 11:02:17 AM10/3/13
to osm...@googlegroups.com
osmconvert http://wiki.openstreetmap.org/wiki/Osmconvert

osmconvert ottpart.osm  -o=base.pbf is an example the other way.

Cheerio John


Harry van der Wolf

unread,
Oct 3, 2013, 1:21:20 PM10/3/13
to osmand

No, this is not correct. osmconvert can't do this.
osmconvert can convert to/from pbf, but that's something different then the OsmAnd .obf format.
The pbf format is the protobuffer format. obf is the osmand format.

It is possible to convert obf to csv using inspector, but the files are huge.



2013/10/3 john whelan <jwhel...@gmail.com>

Stephan75

unread,
Oct 3, 2013, 1:26:59 PM10/3/13
to osm...@googlegroups.com
Hello Lelo,

there is no way to convert obf files back to raw OSM data or shapefiles.


Maybe you can tell us what you want to do, so we can give you more hints.

Stephan

john whelan

unread,
Oct 3, 2013, 1:38:07 PM10/3/13
to osm...@googlegroups.com
Agreed I wasn't thinking, .pbf format can be converted but I think .obf format is internal to OSMAND and strips out quite a bit of information, I think it also includes indexes etc so not intended to be convertible.

Thanks for the correction.

Cheerio John


--

Lelo Neto

unread,
Oct 3, 2013, 2:22:09 PM10/3/13
to osm...@googlegroups.com

Thanks for all the answers.

I already have the files OBF, but I don't have the original files OSM. I need the OSM files to work in another application.

I'm working on the recovery of information from the result inspector.sh.


Thank you.

Andre

unread,
Oct 3, 2013, 2:26:40 PM10/3/13
to osm...@googlegroups.com

Then why don't you download the osm files from geofabrik?

Op 3 okt. 2013 20:22 schreef "Lelo Neto" <marcoaur...@gmail.com>:

V S

unread,
Oct 7, 2013, 6:50:44 PM10/7/13
to osm...@googlegroups.com
Actually this is possible!!!

I used quite a lot to debug/trace issues in OBF file. Please download and try binaryInspector.

The parameter called -osm=.../a.osm. Later you should be able to load into JOSM.



четверг, 3 октября 2013 г., 16:30:28 UTC+2 пользователь Lelo Neto написал:

Harry van der Wolf

unread,
Oct 8, 2013, 1:38:53 AM10/8/13
to osmand
Can you please explain how this (undocumented) feature works?

I just tried inspector.sh with all kind of parameter combinations using the -a=pipo.osm option, but I can't get it to work.

Harry


2013/10/8 V S <victor....@gmail.com>

Andre

unread,
Oct 8, 2013, 3:45:49 AM10/8/13
to osm...@googlegroups.com

I think he means the parameter - osm = path/pipo.osm

Op 8 okt. 2013 07:38 schreef "Harry van der Wolf" <hvd...@gmail.com>:

Harry van der Wolf

unread,
Oct 8, 2013, 11:45:41 AM10/8/13
to osmand
I tried quite a lot of things and the path doesn't make a difference.

Harry


2013/10/8 Andre <andreo...@gmail.com>

Harry van der Wolf

unread,
Oct 8, 2013, 12:42:44 PM10/8/13
to osmand
It's not only the parameter. It's inspector itself as well.
I tried with the new inspector as the old inspector doesn't have the -osm option.
The new inspector doesn't function with the -vaddress and the -vmap which I used. It doesn't give output. Hence the -osm doesn't create a file either.
The -vpoi option works with the new inspector, but still I can't get the -osm parameter to work. When using -osm=./pipo.osm a 0 byte file is created.

I assume the current -vaddress and -vpoi bugs have to do with all the modifications.

Harry



2013/10/8 Andre <andreo...@gmail.com>

So you can omit it ?
-osm = pipo.osm
You used -a = pipo.osm.

Op 8 okt. 2013 17:45 schreef "Harry van der Wolf" <hvd...@gmail.com>:

Andre

unread,
Oct 8, 2013, 12:24:32 PM10/8/13
to osm...@googlegroups.com

So you can omit it ?
-osm = pipo.osm
You used -a = pipo.osm.

Op 8 okt. 2013 17:45 schreef "Harry van der Wolf" <hvd...@gmail.com>:

V S

unread,
Oct 9, 2013, 6:27:55 PM10/9/13
to osm...@googlegroups.com
This is quite documented feature. It is in the help of binaryInspector. Of course it should be latest MapCreator ( a week ago)
println("\nUsage for print info : inspector [-vaddress] [-vstreetgroups] [-vstreets] [-vbuildings] [-vintersections] [-vmap] [-vmapobjects] [-osm] [-vpoi] [-vtransport] [-zoom=Zoom] [-bbox=LeftLon,TopLat,RightLon,BottomLan] [file]");

-osm=/home/file.osm

вторник, 8 октября 2013 г., 7:38:53 UTC+2 пользователь Harry van der Wolf написал:

Harry van der Wolf

unread,
Oct 10, 2013, 1:04:03 AM10/10/13
to osmand
Hi Victor,


2013/10/10 V S <victor....@gmail.com>

This is quite documented feature. It is in the help of binaryInspector. Of course it should be latest MapCreator ( a week ago)
println("\nUsage for print info : inspector [-vaddress] [-vstreetgroups] [-vstreets] [-vbuildings] [-vintersections] [-vmap] [-vmapobjects] [-osm] [-vpoi] [-vtransport] [-zoom=Zoom] [-bbox=LeftLon,TopLat,RightLon,BottomLan] [file]");

-osm=/home/file.osm

I have noticed that. Did you see my bug ticket?
https://code.google.com/p/osmand/issues/detail?id=2186
 
Harry

Victor Shcherb

unread,
Oct 10, 2013, 5:42:15 AM10/10/13
to osmand
Because the contract was changed. Please read Usage.  -vstreets, -vmapobjects , we should not be backward compatible in that area :)

Regards,
Victor


--
You received this message because you are subscribed to a topic in the Google Groups "Osmand" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/osmand/kbVa0GZDd2A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to osmand+un...@googlegroups.com.

Harry van der Wolf

unread,
Oct 10, 2013, 9:39:14 AM10/10/13
to osmand



2013/10/10 Victor Shcherb <victor....@gmail.com>

Because the contract was changed. Please read Usage.  -vstreets, -vmapobjects , we should not be backward compatible in that area :)

Regards,
Victor


Yes, but the same usage also says -vmap and -vaddress
inspector [-vaddress] [-vstreetgroups] [-vstreets] [-vbuildings] [-vintersections] [-vmap] [-vmapobjects] [-osm] [-vpoi] [-vtransport] [-zoom=Zoom] [-bbox=LeftLon,TopLat,
RightLon,BottomLan] [file]")

So I expect that when I use these -vaddress and -vmap options, I also get the output I always used to get.
And if that has changed I expect these options to not longe be in the Usage.
And if I can only use these options in combination with oher options, I expect that in the Usage.
Do you mean that -vaddress and -vmap are no longer valid options? Or that e.g. -vmap only works in combination with -vmapobjects?

Harry

Harry van der Wolf

unread,
Oct 10, 2013, 10:48:29 AM10/10/13
to osmand

Hi Victor,

2013/10/10 Harry van der Wolf <hvd...@gmail.com>



Yes, but the same usage also says -vmap and -vaddress
inspector [-vaddress] [-vstreetgroups] [-vstreets] [-vbuildings] [-vintersections] [-vmap] [-vmapobjects] [-osm] [-vpoi] [-vtransport] [-zoom=Zoom] [-bbox=LeftLon,TopLat,
RightLon,BottomLan] [file]")

So I expect that when I use these -vaddress and -vmap options, I also get the output I always used to get.
And if that has changed I expect these options to not longe be in the Usage.
And if I can only use these options in combination with oher options, I expect that in the Usage.
Do you mean that -vaddress and -vmap are no longer valid options? Or that e.g. -vmap only works in combination with -vmapobjects?

Harry


When reading back this sounds rather harsh. It was not meant like that. I was in "technical mode" and simply mentioning questions, expectations and assumptions.
Sorry if it sounded to offending.

Harry

Victor Shcherb

unread,
Oct 10, 2013, 3:37:24 PM10/10/13
to osmand
No worries, I've got it right. It was changed to give more flexibility.
Or that e.g. -vmap only works in combination with -vmapobjects
Exactly

Victor


--

David Taylor

unread,
Nov 28, 2016, 5:36:33 PM11/28/16
to Osmand
To summarize it is not possible to convert from .obf to .pbf? but it is possible to convert from .pbf to .obf?

john whelan

unread,
Nov 28, 2016, 5:42:02 PM11/28/16
to osm...@googlegroups.com
The native file type of OSMAND .obf contains indexes and I suspect contains a subset of what is in a .pbf file.  You can generate a .obf file from a .pbf file using the mapcreator associated with osmand.

Cheerio John

--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephan75

unread,
Dec 1, 2016, 2:34:03 PM12/1/16
to Osmand
when browsing to https://www.github.com you have a search text field there where you can search for "obf2osm"

... as a result you get three issues inside osmand project where the is "obf2osm mentioned ...

but I don't know whether that is the feature you are looking for?

Stephan

Victor Shcherb

unread,
Dec 2, 2016, 11:29:43 AM12/2/16
to osmand
obf could be converted to osm via binaryInspector.sh but it is pure developer feature and we are not supporting it deeply. So you can't rely on its output.

--
You received this message because you are subscribed to a topic in the Google Groups "Osmand" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/osmand/kbVa0GZDd2A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to osmand+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages