Placename Format

From World Wind Wiki

Jump to: navigation, search

[edit] Old Format

The entire thing is in binary except for the strings, each string has a byte before it saying how many characters are in the string

61 00 00 00 (First 4 bytes are how many placenames are in the file,
             convert from hex to decimal, in little-endian)
-------------------------
17 (1 byte saying there are 23 characters in next string)
Afono Elementary School (the string)
9A 36 64 C1 (latitude in 4 byte signed float)
0A A7 2A C3 (longitude in 4 byte signed float)
04 00 00 00 (4 bytes saying how many meta data entries there are)
0C Feature Type 06 school (meta data follows)
06 County 07 Eastern
05 State 0E American Samoa
0A State Code 02 AS
----------------------------
Add more placenames here to meet the number at the top smile.gif
---------------------------

And now for the wpl (worldwind placename list) files. Much the same humbug applies:

01 00 00 00 (First 4 bytes are how many placename files are in the file, convert from hex to decimal)
-------------------
0D filename.wwp
00 00 34 C4 (4 byte signed float indicating west boundry -180)
00 00 B4 C2 (South boundry -90)
00 00 34 43 (East boundry 180)
00 00 B4 42 (North boundry 90)
------------------
Add more till you reach the number on top
-------------------

[edit] New Format

  • Create header with meta data names
Variable metadata names are defined in a header section of the file as suggested, and each record has a bit vector (e.g. the int currently used for metadata count, would enable to code 16 metadata attributes) that indicates what metadata field (in a well-defined order) is present. This way, we could keep the metadata flexibility (with md either lacking or only partly present), along with great time and space savings.
Personal tools