World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Server Discussion

Server Discussion Sever discussion for configuring, setting up and supporting your own World wind tile server

Reply
 
Thread Tools Display Modes
Old 09-08-2009, 08:07 PM   #1
zengelbert
Junior Member
 
Join Date: Sep 2009
Posts: 4
zengelbert is on a distinguished road
Default WWJ Terrain & Mapserver

I am new to World Wind Java.
I have some high resolution .img file and .dat file elevation/terrain data. I am trying to add my own elevation to WWJ through the use of wms of MapServer (http://mapserver.org/). I have converted the .img file through the use of the gdal utilities to a .bil, .hdr, .hgt, .tif, etc, in an effort to get the elevation/terrain to display in WWJ.

I have changed the EarthMergedElevationModel.xml file to reflect my mapserver's GetCapabilities, GetMapURL, and LayerNames. But in the area of the elevation data the terrain is still flat.

Currently I have the MapServer's .map file displaying as such, and my EarthMergedElevationModel.xml.:
Code:
    NAME 'AGGA'
    DRIVER AGG/PNG
    MIMETYPE "image/png"
    IMAGEMODE RGBA
    EXTENSION "png"
    FORMATOPTION "INTERLACE=OFF"
    ...
LAYER
    NAME myElevationLayerName
    TYPE RASTER
    STATUS ON
    DATA "C:\myElevationLayerName.bil"
    DUMP TRUE
    METADATA
      WMS_TITLE "myElevationLayerName"
      WMS_ABSTRACT "myElevationLayerName"
      WMS_SRS "EPSG:4326"
    END
  PROCESSING "CLOSE_CONNECTION=DEFER"
  END
Code:
<DisplayName>Earth Elevation Model</DisplayName>
        <Service serviceName="OGC:WMS" version="1.3">
            <GetCapabilitiesURL>http://myMapserverLocation/cgi-bin/mapserv.exe</GetCapabilitiesURL>
            <GetMapURL>http://myMapserverLocation/cgi-bin/mapserv.exe</GetMapURL>
            <LayerNames>myElevationLayerName</LayerNames>
        </Service>
        <RetrievePropertiesFromService>true</RetrievePropertiesFromService>
        <LastUpdate>1241377491917</LastUpdate>
        <DataCacheName>Earth/mergedSRTMV1_bil_Test</DataCacheName>
        <ImageFormat>image/tiff</ImageFormat>
        <FormatSuffix>.tif</FormatSuffix>
        <ExtremeElevations min="-11000" max="8850">
            <FileName>config/SRTM30Plus_ExtremeElevations_5.bil</FileName>
        </ExtremeElevations>
        <NumLevels count="10" numEmpty="0"/>
        <TileOrigin>
            <LatLon units="degrees" latitude="-90" longitude="-180"/>
        </TileOrigin>
        <LevelZeroTileDelta>
            <LatLon units="degrees" latitude="20" longitude="20"/>
        </LevelZeroTileDelta>
        <TileSize>
            <Dimension width="150" height="150"/>
        </TileSize>
        <Sector>
            <SouthWest>
                <LatLon units="degrees" latitude="-90" longitude="-180"/>
            </SouthWest>
            <NorthEast>
                <LatLon units="degrees" latitude="90" longitude="180"/>
            </NorthEast>
        </Sector>
        <SectorResolutionLimit maxLevelNum="9">
            <Sector>
                <SouthWest>
                    <LatLon units="degrees" latitude="24" longitude="-125"/>
                </SouthWest>
                <NorthEast>
                    <LatLon units="degrees" latitude="50" longitude="-66.8"/>
                </NorthEast>
            </Sector>
        </SectorResolutionLimit>
        <SectorResolutionLimit maxLevelNum="9">
            <Sector>
                <SouthWest>
                    <LatLon units="degrees" latitude="18.5" longitude="-160.5"/>
                </SouthWest>
                <NorthEast>
                    <LatLon units="degrees" latitude="22.5" longitude="-154.5"/>
                </NorthEast>
            </Sector>
        </SectorResolutionLimit>
        <SectorResolutionLimit maxLevelNum="9">
            <Sector>
                <SouthWest>
                    <LatLon units="degrees" latitude="17.8" longitude="-67.4"/>
                </SouthWest>
                <NorthEast>
                    <LatLon units="degrees" latitude="18.7" longitude="-64.5"/>
                </NorthEast>
            </Sector>
        </SectorResolutionLimit>
        <SectorResolutionLimit maxLevelNum="9">
            <Sector>
                <SouthWest>
                    <LatLon units="degrees" latitude="48" longitude="-179.9"/>
                </SouthWest>
                <NorthEast>
                    <LatLon units="degrees" latitude="66" longitude="-128"/>
                </NorthEast>
            </Sector>
        </SectorResolutionLimit>
        <SectorResolutionLimit maxLevelNum="8">
            <Sector>
                <SouthWest>
                    <LatLon units="degrees" latitude="-54" longitude="-180"/>
                </SouthWest>
                <NorthEast>
                    <LatLon units="degrees" latitude="60" longitude="180"/>
                </NorthEast>
            </Sector>
        </SectorResolutionLimit>
        <SectorResolutionLimit maxLevelNum="4">
            <Sector>
                <SouthWest>
                    <LatLon units="degrees" latitude="-90" longitude="-180"/>
                </SouthWest>
                <NorthEast>
                    <LatLon units="degrees" latitude="90" longitude="180"/>
                </NorthEast>
            </Sector>
        </SectorResolutionLimit>
    </ElevationModel>
</ElevationModel>
Is there any tutorial for getting elevation/terrain data into WWJ from Mapserver? Do you have any ideas to how I can get my own elevation/terrain to display? Do I need to do anything on the MapServer side to display this terrain?
zengelbert is offline   Reply With Quote
Old 09-09-2009, 01:08 PM   #2
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

Did you look at the "Server discussion" forum?
http://forum.worldwindcentral.com/forumdisplay.php?f=47
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 09-09-2009, 09:49 PM   #3
zengelbert
Junior Member
 
Join Date: Sep 2009
Posts: 4
zengelbert is on a distinguished road
Default WWJ Terrain & Mapserver

Ok, I have gotten the world wind java WMS server (http://builds.worldwind.arc.nasa.gov...oad_server.asp) with the instructions from (http://forum.worldwindcentral.com/sh...ad.php?t=21856), with the srtm30 elevation. This is correctly displaying the elevation/terrain for my srtm30 data.
I know that nasa worldwind wms servers elevation in the form of: SRTM 30, SRTM 3 v2 and v4.1, USGS NED, DTED 0/1/2.

I have tried to convert my terrain .img to a .tif, with the gdal_translate inIMG.img outTif.tif and then add it to the WEB-INF/config.xml as a ElevationUSGSNED:
Code:
<mapsource name="EarthElevation" title="EarthElevation">
		<description keywords="EarthElevation">EarthElevation</description>
		<root-dir>C:\WorldWindServer\wwdata\elevation</root-dir>
		<class>gov.nasa.worldwind.servers.wms.generators.CompoundElevationsGenerator</class>
		<property name="gov.nasa.worldwind.avkey.MissingDataFlag" value="-9999" />
		<property name="gov.nasa.worldwind.avkey.ElevationMinKey" value="-11000" />
		<property name="gov.nasa.worldwind.avkey.ElevationMaxKey" value="8850" />
	
		<mapsource name="srtm30" title="SRTM30 Plus">
			<description keywords="SRTM30 Elevation">SRTM30 Elevation Data</description>
			<root-dir>C:\WorldWindServer\wwdata\elevation\srtm30</root-dir>
			<class>gov.nasa.worldwind.servers.wms.generators.ElevationSrtm30</class>
			<property name="gov.nasa.worldwind.avkey.MissingDataFlag" value="-9999" />
			<scale-hint min="0.012" max="0.008333330" />
		</mapsource>
		
		<mapsource name="MyElevation" title="myElevation">
			<description keywords="Elevation">Elevation</description>
			<root-dir>C:\WorldWindServer\wwdata\elevation\outTif</root-dir>
			<class>gov.nasa.worldwind.servers.wms.generators.ElevationUSGSNED</class>
			<property name="gov.nasa.worldwind.avkey.MissingDataFlag" value="-9999" />
			<scale-hint min="0.004" max="0.00027777" />
		</mapsource>
    </mapsource>
But I get a Failed to initialize error Zero NED files found
Code:
C:\WorldWindServer>java -Xmx1024M -classpath .;WMS.jar;lib\worldwind.jar;lib\jog
l.jar;lib\gluegen-rt.jar;lib\activation.jar;lib\jaxb-impl.jar;lib\jsr173_1.0_api
.jar;lib\jaxb-api.jar -Djava.library.path=lib gov.nasa.worldwind.servers.wms.WMS
Server
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.Configuration logMessage
INFO: CONFIG: Falling back to default data file-store configuration file: WEB-IN
F/DataFileStore.xml
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.Configuration logMessage
INFO: CONFIG: Falling back to default data file-store filter: gov.nasa.worldwind
.servers.wms.WMSDataConfigurationFilter
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.Configuration logMessage
INFO: CONFIG: Falling back to default data configuration factory: gov.nasa.world
wind.servers.wms.BasicDataConfigurationFactory
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.Configuration logMessage
INFO: CONFIG: Falling back to default MapSource factory: gov.nasa.worldwind.serv
ers.wms.BasicMapSourceFactory
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.BasicMapRegistry doAdd
INFO: Initializing MapSource EarthElevation...
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.generators.CompoundElevati
onsGenerator initialize
INFO: CompoundElevationsGenerator:initialize(): started...
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.generators.CompoundElevati
onsGenerator initialize
INFO: CompoundElevationsGenerator:initialize( EarthElevation): status=Done!
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.BasicMapRegistry doAdd
INFO: Initializing MapSource srtm30...
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.BasicMapRegistry doAdd
INFO: Initializing MapSource MyElevation...
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.generators.ElevationUSGSNE
D initialize
SEVERE: Zero NED files found in C:\WorldWindServer\wwdata\elevation\outTif
Sep 9, 2009 3:46:33 PM gov.nasa.worldwind.servers.wms.BasicMapRegistry doAdd
SEVERE: Failed to initialize MapSource MyElevation; will not be used.
How do I convert my terrain .img file into one of these elevation formats? And how do add that to my WEB-INF/config.xml
Please help.
zengelbert is offline   Reply With Quote
Old 09-11-2009, 02:43 PM   #4
zengelbert
Junior Member
 
Join Date: Sep 2009
Posts: 4
zengelbert is on a distinguished road
Default WWJ Terrain & Mapserver

Just to update everyone that might be looking at this. To get this to work I converted my .img file to a .tif file format with the gdal_translate utility.
Code:
gdal_translate -a_srs EPSG:4326 “C:\data\dataIN.img” “C:\data\dataOUT.tif”
Then I used something similar to the ElevationSrtm30 class and server the elevation through the worldwind-wms server with the GetCapabilities of:
http://localhost:8085/elev?request=GetCapabilities
And this displayed the elevation that I needed.
zengelbert is offline   Reply With Quote
Reply

Tags
elevation, mapserver, wms


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
How to setup WWJ Hervé Development Help 96 03-04-2013 03:42 PM
Questions using WWJ with WMS mapserver server dcoward Development Help 0 07-14-2009 05:48 PM
Serving Terrain to WWJ - The easy way what_nick Development Help 0 06-19-2009 03:54 AM
Exception when zooming custom terrain - WWJ Omega Development Help 0 10-28-2008 05:24 AM
WWJ bug at high pitch angles near terrain emaronchi Development Help 16 11-14-2007 07:56 PM


All times are GMT +1. The time now is 05:05 AM.


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