Boundary Format

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 14:33, 12 June 2005 (edit)
Nosilleg (Talk | contribs)
(Boundary Format to Boundary Format (French))
← Previous diff
Revision as of 23:24, 12 November 2005 (edit) (undo)
24.30.139.211 (Talk)
(Introduction)
Next diff →
Line 21: Line 21:
Pstring string : A byte indicating the length of the string followed by characters Pstring string : A byte indicating the length of the string followed by characters
-The altitudes are important, they allow the paths to float above the terrain, otherwise the disappear within the mountains.+The altitudes are important, they allow the paths to float above the terrain, otherwise they disappear within the mountains.
==wwb Format== ==wwb Format==

Revision as of 23:24, 12 November 2005

This article has been translated from the original article in French.

Note: The usefulness or effectiveness of the altitude in pkg files with World Wind 1.3 is up in the air. See this thread for details

Contents

Introduction

The wwb files are used to define boundaries (countries and states), and you can make a pathlist with them using PathListArchiver.exe.

The pkg and idx files are used to define the pathlist (in 3D).

This document details the binary formats of these files and thus the associated XML files.


The types used are:

int32		32-bit integer
int64		64-bit integer
smallint	16-bit integer

Single	1.5 x 10^-45 .. 3.4 x 10^38	4-byte real number
Double	5.0 x 10^-324 .. 1.7 x 10^308	8-byte real number

Pstring	string : A byte indicating the length of the string followed by characters

The altitudes are important, they allow the paths to float above the terrain, otherwise they disappear within the mountains.

wwb Format

The file begins with a 32-bit integer containing the number of entries in the file. The file continues with a series of entries consisting of a float latitude and float longitude.

int32	number of pairs (latitude, longitude) in the file

// entry 1

single	latitude	
single	longitude

// entry 2

single	latitude	
single	longitude


IDX Format

The file begins with the number of wwb files associated in a 32-bit integer. Next is an entry for each wwb file. Each entry consists of a string, the west, south, east, and north limits in a double, and a 64-bit integer for the offset of the data in the pkg file.

int32	Number of wwb files = Number of groups in this package

// wwb file 1 (wwb offset 1)

PString	name of a wwb file, a string
double	west
double	south
double	east
double	north
Int64	offset wwb 1 = offset of data in pkg file

// wwb file 2 (wwb offset 2)

PString	name of a wwb file, a string
double	west
double	south
double	east
double	north
Int64	offset wwb 1 = offset of data in pkg file

// wwb file 3 (wwb offset 3)
...

pkg format

The file contains a list of the entries containing the coordinates of each of the associated wwb files. Every description starts with a 32-bit number indicating the number of entries in the section, followed by the number of elements per entry (3 for latitude, longitude and altitude). Next are the list of entries (lat, long, h).

// wwb file 1 (wwb offset 1)

int32	number of entries (lat, long, h)
byte	number of elements per entry = 3 (lat, long, h)

// entry 1
double	lat
double	long
smallint	h (16 bits)

// entry 2
double	lat
double	long
smallint	h (16 bits)

...

// wwb file 2  (wwb 2)

int32	number of entries (lat, long, h)
byte	number of elements per entry = 3 (lat, long, h)

// entry 1
double	lat
double	long
smallint	h (16 bits)

// entry 2
double	lat
double	long
smallint	h (16 bits)

...

// wwb file 3
...

Example of the XML file associated with a pathlist

<?xml version="1.0" encoding="UTF-8"?>
<LayerSet Name="" ShowOnlyOneLayer="false" ShowAtStartup="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\WorldWind\bin\Debug\Configuration\EarthLayers\LayerSet.xsd">
<PathList ShowAtStartup="true">
<Name>Trail</Name>
<DistanceAboveSurface>1000</DistanceAboveSurface>
<MinDisplayAltitude>0</MinDisplayAltitude>
<MaxDisplayAltitude>6000000</MaxDisplayAltitude>
<PathsDirectory>Data\WorldWindow.Earth\monchemin</PathsDirectory>
<WinColorName>Cyan</WinColorName>
</PathList>
</LayerSet>

The folder Data\WorldWindow.Earth\monchemin contains a file pathlist.pkg and a file pathlist.idx that define the path.

Personal tools