World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Applications

Applications Discussion of applications that use WWJ

Reply
 
Thread Tools Display Modes
Old 02-13-2008, 01:12 AM   #1
james.fry
Member
 
Join Date: Dec 2007
Location: Cheltenham
Posts: 31
james.fry is on a distinguished road
Smile Private network (intranet) WWJ / WW cache packs

Apologies if this has been covered before...

I'm making use of WWJ on a private network / intranet and have been making use of the WorldWind .NET cache packs served from an internal Apache web server via a simple php tile script. In order for WWJ to run successfully in this environment I've created a very noddy NetworkStatus implementation that doesn't do any internet availability checks (but still supports an 'offline' override) and modified a couple of layers to use my server.

The files I've created are attached - I've tested it so far serving the BMNG (levels 01234) and Landsat (levels 012, but no 2NE) cachepacks, as well as a custom tile set, so theoretically other datasets should work too.

The php script is very simple - essentially it is just an image proxy script with some parameter reformatting to derive the path on disk. I've done some awful validation to hopefully remove any manipulation of the script, but it was thrown together as a hack.

Once you've added the compiled files to your classpath you will need to use the new NetworkStatus class and Layers in your worldwind.properties (or can these individual fields be overridden on the command line?). E.g.:

gov.nasa.worldwind.avkey.NetworkStatusCl assName=gov.nasa.worldwind.util.LanNetwo rkStatus
gov.nasa.worldwind.avkey.LayerClassNames =\
gov.nasa.worldwind.layers.Earth.StarsLay er\
,gov.nasa.worldwind.layers.Earth.SkyGrad ientLayer\
,gov.nasa.worldwind.layers.Earth.FogLaye r\
,gov.nasa.worldwind.layers.Earth.BMNGOne Image\
,gov.nasa.worldwind.layers.Earth.BMNGSur faceLayerCache\
,gov.nasa.worldwind.layers.Earth.WorldMa pLayer\
,gov.nasa.worldwind.layers.Earth.Scaleba rLayer\
,gov.nasa.worldwind.layers.CompassLayer


Regards,

James
Attached Files
File Type: txt tile.php.txt (1.7 KB, 355 views)
File Type: txt LanNetworkStatus.java.txt (2.9 KB, 348 views)
File Type: txt BMNGSurfaceLayerCache.java.txt (1.5 KB, 348 views)
james.fry is offline   Reply With Quote
Old 02-13-2008, 05:36 PM   #2
worldwindnewbie
Junior Member
 
Join Date: Feb 2008
Posts: 19
worldwindnewbie is on a distinguished road
Default

Hi James,

I also attempted the same thing. It worked in the sense that it did hit my image proxy, however it was not saving those images into cache. It created those cache directories but it would not actually save those jpg files into those folders. Any pointers?
worldwindnewbie is offline   Reply With Quote
Old 02-13-2008, 06:09 PM   #3
worldwindnewbie
Junior Member
 
Join Date: Feb 2008
Posts: 19
worldwindnewbie is on a distinguished road
Default

Never Mind, I got it working.

Silly me, I forgot to specify the response mimetype.
worldwindnewbie is offline   Reply With Quote
Old 02-13-2008, 06:53 PM   #4
worldwindnewbie
Junior Member
 
Join Date: Feb 2008
Posts: 19
worldwindnewbie is on a distinguished road
Default

Do you know how to disable the srtm30pluszip layer?
worldwindnewbie is offline   Reply With Quote
Old 02-14-2008, 08:46 PM   #5
james.fry
Member
 
Join Date: Dec 2007
Location: Cheltenham
Posts: 31
james.fry is on a distinguished road
Default

You have a number of options, but to me the easiest are probably these - but what do I know

edit the worldwind.properties file (or create your own based on and tell WorldWind to use it for its configuration with a JVM option of -Dgov.nasa.worldwind.config.file=foo.prop erties). You will need to set the property gov.nasa.worldwind.avkey.LayerClassNames so that it doesn't include gov.nasa.worldwind.layers.Earth.USGSUrba nAreaOrtho.

You can create your own model for WorldWind to use (check the source of BasicModel)

You can use BasicModel, but customise the layer list (this is what I've played with, but I've also used the other options). You need to call model.getLayers() and modify the list (or pass in a new LayerList object initialised with the Layer objects you wish to use - you can see an example of this in the JavaOneDemoB iirc).

Regards

James
james.fry is offline   Reply With Quote
Old 02-15-2008, 01:39 PM   #6
zerobarrier
Developer
 
Join Date: Dec 2007
Posts: 55
zerobarrier is on a distinguished road
Default

Good work James.
zerobarrier is offline   Reply With Quote
Old 02-15-2008, 01:54 PM   #7
rational_8
Junior Member
 
Join Date: Jan 2008
Posts: 28
rational_8 is on a distinguished road
Default

Hi James,
I am interested for custom tile set. I have some results that i want to visualize. I tried dstile but it somehow not giving results and is not showing error message. Anyway I am writing a program for creating BIL file and tilecache could be used for tiles creation.. What I understand about file structure is that I do not need the BIL file for all tiles and even of the same size(only same width-hight proportion) . I am completely new to World Wind JDK. Would you please tell me in briefly how I could use the technique you mentioned above.

I tried this, interestingly it works for image size 512. But when I changed the tile size to 255 and corresponding changes in BMNGSurfaceLayerCache. it does not worked. it was caching all the tiles but not displaying.

Last edited by rational_8; 02-22-2008 at 03:48 PM.
rational_8 is offline   Reply With Quote
Old 07-20-2009, 07:36 AM   #8
Kingdom2k
Junior Member
 
Join Date: May 2009
Posts: 4
Kingdom2k is on a distinguished road
Default

Quote:
Originally Posted by worldwindnewbie View Post
Do you know how to disable the srtm30pluszip layer?
There is an easy way to do this:
canvas.getModel().getGlobe().setElevatio nModel(null);

This Line prevents WorldWind from downloading the srtm30pluszip-layer..

In WWJ 0.5 you have also this posibility:

canvas.getModel.getGlobe.getElevationMod el.setEnabled(false);
Kingdom2k is offline   Reply With Quote
Old 03-15-2011, 02:50 AM   #9
chow kyo
Member
 
Join Date: Dec 2010
Posts: 71
chow kyo is on a distinguished road
Default

Quote:
Originally Posted by james.fry View Post
Once you've added the compiled files to your classpath you will need to use the new NetworkStatus class and Layers in your worldwind.properties (or can these individual fields be overridden on the command line?). E.g.:
sorry to weak up this thread
I want to server the cache of WWJ0.6,the image format is .dds

so ... I just do as you say , but no response ,please ,How I should do?
chow kyo is offline   Reply With Quote
Old 07-26-2011, 10:37 AM   #10
gerry90
Guest
 
Posts: n/a
Default

Good work James. Quite usefull
  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
WorldWindData.com - World Wind Cache Packs f0urtyfive Add-ons & Scripts 152 09-19-2012 07:58 PM
WW to WWJ Cache Pack converter Chiss Development Help 18 10-24-2010 08:24 AM
Cache Packs Levels 0 and 1 ! svheuven Add-ons & Scripts 37 06-12-2005 12:39 AM
Official NLT Landsat Cache packs for 1.3.1 f0urtyfive Add-ons & Scripts 27 05-15-2005 06:26 AM
second tier WW data cache packs johnh Developers' Corner 3 02-28-2005 08:53 PM


All times are GMT +1. The time now is 08:52 PM.


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