III. DGML SYNTAX FOR LAYERS: ============================ Marble uses its own XML format called "DGML" to load and save maps. The DGML map format describes the basic properties of a map. The format assumes that the map consists of data that gets imported and integrated from various data sources. So it's different from other map formats which try to describe all the features in a map themselves: DGML reuses existing map data from established file formats (e.g. KML, GPX, GeoRSS), arranges them in layers and compiles them together into a new map. Additionally DGML 2 provides means to connect the checkboxes used in the legend to switch items on the map on and off. This is done using the "connect" attribute in a manner similar to Qt's Signals and Slots. The DGML 2 format has got four main sections: 1. The HEAD section in which basic properties get defined. 2. The MAP section in which the layer structure gets defined. Via the CONNECT attribute the layers and dataSets can get connected to the properties provided by the settings section. This provides the ability to connect the checkboxes in the legend to the layers on the map being displayed. E.g. the attribute connect="borders" located in the "pborder" dataSet tag would enable to switch the international border on and off on the map via the associated property value. 3. The SETTINGS section which contains all properties that can get stored. This section basically contains the model for all properties. Mostly it contains the information whether a particular geographical feature is available (i.e. the map provides a "relief") and whether it is enabled by default. 4. The LEGEND section in which the markup of custom legend elements get defined (to be done in the future: the whole legend should get defined here). Via the CONNECT attribute the checkable legend sections and items can get connected to the properties provided by the settings section. The order inside the map section follows the rendering process: 1.) The rendering order starts at some distant point ( z = -infinity ) behind earth and approaches the observer until it reaches the globe. Obviously this range is only relevant for projections similar to the spherical one. 2.) Then the rendering order continues projection based from the surface up into the lower atmosphere. 3.) At last all layers between the earth's orbit (satellites!) up to the observer get rendered (z > 0). EXAMPLE 1 : ATLAS ( filename: srtm.dgml ) ----------------------------------------- Atlas earth srtm true classic topographic map. It uses vector lines to mark coastlines, country borders etc. and bitmap graphics to create the height relief.]]> 900 2100 false earth/srtm srtm.jpg earth/mwdbii/PCOAST.PNT earth/mwdbii/PISLAND.PNT earth/mwdbii/PLAKEISLAND.PNT earth/mwdbii/PLAKE.PNT earth/mwdbii/PGLACIER.PNT srtm mwdbii seapalette.pal landpalette.pal earth/mwdbii/PDIFFBORDER.PNT earth/mwdbii/PUSA48.DIFF.PNT earth/mwdbii/DATELINE.PNT earth/mwdbii/RIVER.PNT cityplacemarks.kml placemark baseplacemarks.kml placemark elevplacemarks.kml placemark otherplacemarks.kml placemark boundaryplacemarks placemark true true true true true true true true true true true true
Boundaries International State
Water Bodies Lake River
Elevation 7000 m 5000 m 3500 m 2000 m 1000 m 500 m 200 m 50 m 0 m 0 m (Water) -50 m -200 m -2000 m -4000 m -6500 m -11000 m