how to inspect with inspector?

219 views
Skip to first unread message

Oleh Olkhovskyy

unread,
May 5, 2014, 4:55:32 PM5/5/14
to osm...@googlegroups.com
Hi everyone,

I'm trying to build a plugin for OsmAnd, and have mulitple problems with it.
First one is with inspect tool. I'm trying to check whether my custom obf file has information that i need.
If I run "inspector.bat -vaddress Leuven.obf" where Leuven.obf is my file I should see all addresses from the file.
However I see only summary:

D:\Development\OsmAnd\tools\OsmAndMapCreator>java.exe -Djava.util.logging.config.file=logging.properties -Xms64M -Xmx512M -cp "./OsmAndMapCreator.jar;./lib/OsmAnd-core.jar;./lib
/*.jar" net.osmand.binary.BinaryInspector -vaddress D:\Maps\OsmAnd\Leuven.obf
Binary index Leuven.obf version = 2 edition = Sat May 03 21:55:35 CEST 2014
1 Map data Leuven - 2629699 bytes
        1.1 Map level minZoom = 15, maxZoom = 22, size = 1830350 bytes
                Bounds (left top - right bottom) : 4.59, 50.92 NE - 4.81, 50.83 NE
        1.2 Map level minZoom = 13, maxZoom = 14, size = 435543 bytes
                Bounds (left top - right bottom) : 4.59, 50.92 NE - 4.81, 50.83 NE
        1.3 Map level minZoom = 12, maxZoom = 12, size = 260846 bytes
                Bounds (left top - right bottom) : 4.59, 50.92 NE - 4.81, 50.83 NE
        1.4 Map level minZoom = 11, maxZoom = 11, size = 94734 bytes
                Bounds (left top - right bottom) : 4.59, 50.92 NE - 4.81, 50.83 NE
2 Routing data Leuven - 513046 bytes
        Bounds (left top - right bottom) : 4.59, 50.92 NE - 4.81, 50.83 NE
3 Address data Leuven - 519641 bytes
        3.1 Address part size=317777 bytes
        3.3 Address part size=74372 bytes
        3.2 Address part size=67266 bytes
        Cities/Towns section, 3 group(s)
        Villages section, 17 group(s)
        Postcodes section, 15 group(s)
4 Poi data Leuven - 383992 bytes
5 Transport data Leuven - 79923 bytes
        Bounds (left top - right bottom) : 4.591, 50.9196 NE - 4.8095, 50.8309 NE

How can I see what's in the file?

In fact I am not looking for addresses but for points with rcn_ref tags, so I hoped that "-vmap" parameter can dump everything and I can search for rcn_ref tag.
However - vmap also doesn't output anything except summary.

Thanks,

Oleh.

Stephan75

unread,
May 6, 2014, 12:30:10 PM5/6/14
to osm...@googlegroups.com
what is the output when you start inspector.bat with only parameter -h ??

Maybe there are some more parameters needed, like -vstreets or -vstreetgroups ??

Stephan

Harry van der Wolf

unread,
May 6, 2014, 2:17:10 PM5/6/14
to osmand
You need to use ./inspector.sh -vmap -vmapobjects <obf file> to see the map objects.
The new inspector wants to see the main obf content object and then the contents of it (1-map, 2-routing, 3-address, etc) .

-vmap has only one option: -vmap -vmapobjects
-vaddress has 4 options: [-vaddress] [-vstreetgroups] [-vstreets] [-vbuildings] [-vintersections]

Harry


--
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/d/optout.

Oleh Olkhovskyy

unread,
May 7, 2014, 4:43:07 PM5/7/14
to osm...@googlegroups.com
That works like a charm, thanks!

Would be nice if someone could update current command line message and sample in the wiki to this new semantics of parameters.

Stephan75, help gives this output:

D:\Development\OsmAnd\tools\OsmAndMapCreator>java.exe -Djava.util.logging.config.file=logging.properties -Xms64M -Xmx512M -cp "./OsmAndMapCreator.jar;./lib/OsmAnd-core.jar;./lib
/*.jar" net.osmand.binary.BinaryInspector
Inspector is console utility for working with binary indexes of OsmAnd.
It allows print info about file, extract parts and merge indexes.

Usage for print info : inspector [-vaddress] [-vstreetgroups] [-vstreets] [-vbuildings] [-vintersections] [-vmap] [-vmapobjects] [-osm] [-vpoi] [-vtransport] [-zoom=Zoom] [-bbox
=LeftLon,TopLat,RightLon,BottomLan] [file]
  Prints information about [file] binary index of OsmAnd.
  -v.. more verbouse output (like all cities and their streets or all map objects with tags/values and coordinates)

Usage for combining indexes : inspector -c file_to_create (file_from_extract ((+|-)parts_to_extract)? )*
        Create new file of extracted parts from input file. [parts_to_extract] could be parts to include or exclude.
  Example : inspector -c output_file input_file +1,2,3
        Extracts 1, 2, 3 parts (could be find in print info)
  Example : inspector -c output_file input_file -2,3
        Extracts all  parts excluding 2, 3
  Example : inspector -c output_file input_file1 input_file2 input_file3
        Simply combine 3 files
  Example : inspector -c output_file input_file1 input_file2 -4
        Combine all parts of 1st file and all parts excluding 4th part of 2nd file



--
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/amP5cFzHUg8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to osmand+un...@googlegroups.com.

Harry van der Wolf

unread,
May 7, 2014, 4:52:17 PM5/7/14
to osmand
2014-05-07 22:43 GMT+02:00 Oleh Olkhovskyy <oleh.ol...@gmail.com>:
That works like a charm, thanks!

Would be nice if someone could update current command line message and sample in the wiki to this new semantics of parameters.



I will update the wiki this weekend or so and create a patch to update the help on the command line.

Harry
Reply all
Reply to author
Forward
0 new messages