HOWTO Write a new layer for tiled data - GeoscienceAustralia/earthsci GitHub Wiki

The predecessor to EarthSci was the GA 3D Data Viewer, which used a "Layer Definition File" (LDF) describe metadata about layers and allow them to be imported into the tool. EarthSci attempts to make this process easier by allowing users to import data directly and configure metadata using wizard-based import tools, but the legacy LDF format is still supported, and may be a good way to import your data.

Information on the LDF is available in the Layer Definition File specification, and information on creating tiled datasets is available via the GA WorldWind Suite wiki

The following is an example of a local (offline) LDF that will read tiles from the newly generated tileset. A summary of the important elements is provided below.

<?xml version="1.0" encoding="UTF-8"?>
<Layer version="1" layerType="TiledImageLayer">
	<DisplayName>My Layer Name</DisplayName>
	<Service serviceName="DelegatorTileService">
		<URL>./tilesets</URL>
	</Service>
	<Delegates>
		<Delegate>LocalRequester</Delegate>
	</Delegates>
	<LastUpdate>12 08 2011 00:00:00 GMT</LastUpdate>
	<DatasetName>mylayer</DatasetName>
	<DataCacheName>MyOrg/Category/myLayer</DataCacheName>
	<ImageFormat>image/jpg</ImageFormat>
	<AvailableImageFormats>
		<ImageFormat>image/jpg</ImageFormat>
	</AvailableImageFormats>
	<FormatSuffix>.jpg</FormatSuffix>
	<NumLevels count="7" numEmpty="0" />
	<TileOrigin>
		<LatLon units="degrees" latitude="-90" longitude="-180" />
	</TileOrigin>
	<LevelZeroTileDelta>
		<LatLon units="degrees" latitude="36" longitude="36" />
	</LevelZeroTileDelta>
	<TileSize>
		<Dimension width="512" height="512" />
	</TileSize>
	<Sector>
		<SouthWest>
			<LatLon units="degrees" latitude="-43.7605" longitude="112.8995" />
		</SouthWest>
		<NorthEast>
			<LatLon units="degrees" latitude="-8.9995" longitude="153.6705" />
		</NorthEast>
	</Sector>
	<UseTransparentTextures>true</UseTransparentTextures>
	<ForceLevelZeroLoads>true</ForceLevelZeroLoads>
	<RetainLevelZeroTiles>true</RetainLevelZeroTiles>
	<TextureFormat>image/dds</TextureFormat>
	<UseMipMaps>true</UseMipMaps>
</Layer>

Important bits:

  1. <Service serviceName="DelegatorTileService">
    The DelegatorTileService allows the use of the delegate mechanism which allows for local tile reading and various filters etc. to be applied.

  2. <Delegate>LocalRequester</Delegate>
    The LocalRequester delegate overrides the default (remote) tile retrieval mechanism and allows tiles to be read from a local tileset.

  3. <URL>./</URL> + <DatasetName>mylayer</DatasetName>
    When using the LocalRequester, the <URL> and <DatasetName> elements are used together to form the path to the tileset directory, with relative paths being relative to the LDF location. In the example above, the tiles will be retrieved from ./tilesets/mylayer/0/... etc. where ./ is the directory in which the LDF resides.

  4. <DataCacheName>
    Specifies the location in which cached tiles are stored. Note that this is not used for local tilesets, but as it will be required when the tileset is published it's a good idea to specify it now.

  5. <ImageFormat>image/jpg</ImageFormat> and <ImageFormat>image/jpg</ImageFormat>
    Should match the image format of the tileset (e.g. image/jpg or image/png).

  6. <NumLevels count="7" numEmpty="0" />
    Should match the number of levels generated in the tileset. This value can be found in the tiling log in the tileset folder.

  7. <LevelZeroTileDelta>
    This needs to match the Level Zero Tile Size (LZTS) used when tiling. This value can be found in the tiling log.

  8. <Sector>
    This should define the extents of the tileset. This value can be found in the tiling log.

⚠️ **GitHub.com Fallback** ⚠️