World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 03-01-2012, 11:30 AM   #1
Sphynx
Junior Member
 
Join Date: Jul 2011
Posts: 9
Sphynx is on a distinguished road
Default Custom layers and elevation exception

Hi all,

i'm testing to import some maps as TiledImageLayer. Everything is okay but I have an exception with a map :

Code:
1 mars 2012 12:06:35 gov.nasa.worldwind.terrain.BasicElevationModel getExtremeElevations
ATTENTION: Exception while determining extreme elevations for (56.98828125°, -20.00390625°), (92.98828125°, 15.99609375°)
The conf of my layer is :

Code:
	<FormatSuffix>.dds</FormatSuffix>
	<NumLevels count="12" numEmpty="11" />
	<Sector>
		<SouthWest>
			<LatLon latitude="56.98828125" longitude="-20.00390625" units="degrees" />
		</SouthWest>
		<NorthEast>
			<LatLon latitude="57.005859375" longitude="-19.96875" units="degrees" />
		</NorthEast>
	</Sector>
	<TileOrigin>
		<LatLon latitude="56.98828125" longitude="-20.00390625" units="degrees" />
	</TileOrigin>
	<TileSize>
		<Dimension height="512" width="512" />
	</TileSize>
	<LevelZeroTileDelta>
		<LatLon latitude="36.0" longitude="36.0" units="degrees" />
	</LevelZeroTileDelta>
	<Service serviceName="WWTileService" />
	<ImageFormat>image/dds</ImageFormat>
	<UseMipMaps>true</UseMipMaps>
	<UseTransparentTextures>true</UseTransparentTextures>
	<DetailHint>0.6020599913279625</DetailHint>
It seems the system try to load elevations for a tile at the level 0 with a size based on the level zero tile delta (36°). But the first level of my layer is the 12 and even if i remove the custom detail hint i still get the exception.
I tried to add a max ActiveAltitudes in my conf layer and there's no exception until the max altitude is reach.

The elevation model i use is EarthElevationModel.bil16 ant its conf layer :

Code:
	<DisplayName>USA 10m, World 30m, Ocean 900m</DisplayName>
	<MissingData signal="-9999.0" />
	<DataDetailHint>0.2</DataDetailHint>
	<DatasetName>mergedAsterElevations</DatasetName>
	<DataCacheName>Earth/EarthElevationModel.bil16</DataCacheName>
	<Service serviceName="OGC:WMS" version="1.3">
		<LayerNames>mergedAsterElevations</LayerNames>
		<GetMapURL>http://data.worldwind.arc.nasa.gov/elev</GetMapURL>
		<GetCapabilitiesURL>http://data.worldwind.arc.nasa.gov/elev</GetCapabilitiesURL>
	</Service>
	<LastUpdate>1261011661000</LastUpdate>
	<FormatSuffix>.bil</FormatSuffix>
	<NumLevels count="12" numEmpty="0" />
	<Sector>
		<SouthWest>
			<LatLon latitude="-90.0" longitude="-180.0" units="degrees" />
		</SouthWest>
		<NorthEast>
			<LatLon latitude="90.0" longitude="180.0" units="degrees" />
		</NorthEast>
	</Sector>
	<SectorResolutionLimit maxLevelNum="11">
		<Sector>
			<SouthWest>
				<LatLon latitude="24.0" longitude="-125.0" units="degrees" />
			</SouthWest>
			<NorthEast>
				<LatLon latitude="50.0" longitude="-66.8" units="degrees" />
			</NorthEast>
		</Sector>
	</SectorResolutionLimit>
	<SectorResolutionLimit maxLevelNum="11">
		<Sector>
			<SouthWest>
				<LatLon latitude="18.5" longitude="-160.5" units="degrees" />
			</SouthWest>
			<NorthEast>
				<LatLon latitude="22.5" longitude="-154.5" units="degrees" />
			</NorthEast>
		</Sector>
	</SectorResolutionLimit>
	<SectorResolutionLimit maxLevelNum="11">
		<Sector>
			<SouthWest>
				<LatLon latitude="17.8" longitude="-67.4" units="degrees" />
			</SouthWest>
			<NorthEast>
				<LatLon latitude="18.7" longitude="-64.5" units="degrees" />
			</NorthEast>
		</Sector>
	</SectorResolutionLimit>
	<SectorResolutionLimit maxLevelNum="11">
		<Sector>
			<SouthWest>
				<LatLon latitude="48.0" longitude="-179.9" units="degrees" />
			</SouthWest>
			<NorthEast>
				<LatLon latitude="66.0" longitude="-128.0" units="degrees" />
			</NorthEast>
		</Sector>
	</SectorResolutionLimit>
	<SectorResolutionLimit maxLevelNum="9">
		<Sector>
			<SouthWest>
				<LatLon latitude="-54.0" longitude="-180.0" units="degrees" />
			</SouthWest>
			<NorthEast>
				<LatLon latitude="60.0" longitude="180.0" units="degrees" />
			</NorthEast>
		</Sector>
	</SectorResolutionLimit>
	<SectorResolutionLimit maxLevelNum="4">
		<Sector>
			<SouthWest>
				<LatLon latitude="-90.0" longitude="-180.0" units="degrees" />
			</SouthWest>
			<NorthEast>
				<LatLon latitude="90.0" longitude="180.0" units="degrees" />
			</NorthEast>
		</Sector>
	</SectorResolutionLimit>
	<TileOrigin>
		<LatLon latitude="-90.0" longitude="-180.0" units="degrees" />
	</TileOrigin>
	<TileSize>
		<Dimension height="150" width="150" />
	</TileSize>
	<LevelZeroTileDelta>
		<LatLon latitude="20.0" longitude="20.0" units="degrees" />
	</LevelZeroTileDelta>
	<RetrievePropertiesFromService>true</RetrievePropertiesFromService>
	<ImageFormat>application/bil16</ImageFormat>
	<DataType byteOrder="LittleEndian" type="Int16" />
	<ExtremeElevations max="8850.0" min="-11000.0">
		<FileName>config/SRTM30Plus_ExtremeElevations_5.bil</FileName>
	</ExtremeElevations>
Thanks for your help.

Florent.
Sphynx is offline   Reply With Quote
Old 03-07-2012, 05:10 PM   #2
Sphynx
Junior Member
 
Join Date: Jul 2011
Posts: 9
Sphynx is on a distinguished road
Default

Well i found something in TiledImageLayer class : the createTopLevelTiles() method is called to create the topLevels field :

Code:
        Sector sector = this.levels.getSector();

        Level level = levels.getFirstLevel();
        Angle dLat = level.getTileDelta().getLatitude();
        Angle dLon = level.getTileDelta().getLongitude();
        Angle latOrigin = this.levels.getTileOrigin().getLatitude();
        Angle lonOrigin = this.levels.getTileOrigin().getLongitude();
The latOrigin and lonOrigin angles are okay but not dLat and dLon because the value is 36° (LevelZeroTileDelta) although my tile delta is 36 / Math.pow(2.0d, numEmpyLevels).

I'll try to set in my conf file <NumLevels count="1" numEmpty="0" /> and compute the correct LevelZeroTileDelta.


Edit : it works but I have to compute the ActiveAltitudes max not to show layers at all levels.

Last edited by Sphynx; 03-07-2012 at 05:30 PM. Reason: It works but ...
Sphynx is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with layer SRTM 90m Digital Elevation Data (no-data) and other layers. NoCk Development Help 4 10-10-2011 09:16 AM
Normal mapping (GLSL shader) Omega Feature Discussion 12 09-11-2011 10:53 PM
Adding Elevation Layers joefitz Server Discussion 10 10-26-2010 04:02 PM
WMS Elevation Data beaker Developers' Corner 9 12-24-2009 09:08 AM
New Elevation Data Layers jdorny Development Help 1 06-12-2007 06:40 PM


All times are GMT +1. The time now is 02:44 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.