Reputation: 1
In the worldwind java project, I wrote my own localhost server link instead of nasa server links in the layer.xml files. but the project still continues to pull data from nasa. What exactly should I do to pull the data from my own site?
the code of the xml file I edited:
<Layer version="1" layerType="TiledImageLayer">
<DisplayName>Blue Marble (WMS) 2004</DisplayName>
<Service serviceName="OGC:WMS" version="1.3">
<GetCapabilitiesURL>http://localhost:8080/geoserver/www/explorer/index.html</GetCapabilitiesURL>
<GetMapURL>http://localhost:8080/geoserver/www/explorer/index.html</GetMapURL>
<LayerNames>bmng200405</LayerNames>
</Service>
<RetrievePropertiesFromService>true</RetrievePropertiesFromService>
<!-- day month year hours:minutes:seconds timezone -->
<LastUpdate>26 03 2009 00:00:00 GMT</LastUpdate>
<DataCacheName>Earth/BMNGWMS/BMNG(Shaded + Bathymetry) Tiled - Version 1.1 - 5.2004</DataCacheName>
<ImageFormat>image/dds</ImageFormat>
<AvailableImageFormats>
<ImageFormat>image/png</ImageFormat>
<ImageFormat>image/dds</ImageFormat>
</AvailableImageFormats>
<FormatSuffix>.dds</FormatSuffix>
<NumLevels count="5" 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="-90" longitude="-180"/>
</SouthWest>
<NorthEast>
<LatLon units="degrees" latitude="90" longitude="180"/>
</NorthEast>
</Sector>
<ForceLevelZeroLoads>true</ForceLevelZeroLoads>
<RetainLevelZeroTiles>true</RetainLevelZeroTiles>
<UseTransparentTextures>false</UseTransparentTextures>
<RetrievalTimeouts>
<ReadTimeout>
<Time units="milliseconds" value="30000"/>
</ReadTimeout>
</RetrievalTimeouts>
<!-- The following lines are included just to show how to set the values to other than their defaults -->
<MaxAbsentTileAttempts>2</MaxAbsentTileAttempts>
<MinAbsentTileCheckInterval>1000</MinAbsentTileCheckInterval>
</Layer>
I still see the timeout error I get when I run the project, trying to pull data from NASA's site.
Sep 09, 2021 2:44:50 PM gov.nasa.worldwind.util.SessionCacheRetrievalPostProcessor run
SEVERE: Retrieval failed for https://worldwind26.arc.nasa.gov/elev?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
Sep 09, 2021 2:44:50 PM gov.nasa.worldwind.util.SessionCacheUtils retrieveSessionData
SEVERE: Exception while retrieving resources for https://worldwind26.arc.nasa.gov/elev?EXCEPTIONS=application/vnd.ogc.se_xml&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
java.net.SocketTimeoutException: Read timed out
Upvotes: 0
Views: 434
Reputation: 1
First of all, as another friend suggested, try clearing your nasaWW cache. Then take a look at this link and make sure you have set up the URLs to your GeoServer correctly. I don't understand why you passing an HTML file for the "GetCapabilitiesURL" request. I have done this many times and I assure you it shouldn't be a challenge if your server is running, the port you are referring to is not blocked and finally, your request to the geoserver is written correctly.
Take a look at the original layer.xml. you can see some are predefined layers in NWW and some have been referred to another XML file for more information to connect to NWW's server. For example, consider BMNGWMSLayer.xml and see the right way to write and pass a "GetCapabilitiesURL" request to NWW.
However, another way to do this is to create a WMS layer inline and add it to your NWW layer list. see WMSLayerManager.
And sometimes those warnings from NWW's server don't concern you or your codes.
I believe that I could assist you much further if you explain and share more information, my friend.
Upvotes: 0
Reputation: 1067
First, make sure you are loading the config file you want (there might be one inside the worldwind.jar so be explicit):
System.setProperty("gov.nasa.worldwind.config.file","path/to/worldwind.xml");
Then clear the WorldWind download cache, just in case.
Configuration Documentation Here
Upvotes: 0