I have my own local data in Mr. SID format that I’m trying to display in WorldWind (locally; just for a single PC). I’ve read a bunch of threads on this, but I’m still stuck. Here’s what I’ve done.
Used GlobalMapper to export the Mr. SID files into WWJ cache (it has that option). All files and folders do not have the leading zeros that I’ve been reading about, so I think I’m good with that. It did create an xml configuration file, but I think that’s not supported by WWJ. Ideally, I’d like my application to just be able to add new custom layer dynamically, but I don’t think that’s built in to WWJ.
I took the resulting folder, called “MyLocalData” and placed it in C:\ProgramData\WorldWindData\MyLocalData . I’m on Vista and I know this is the correct place because that’s where data goes when fetching items from built-in online sources.
Now, how to get this to display in WWJ. It appears I need to add a new layer in my code. So, I did that and extended from BasicTileImageLayer. My makeLevels method looks like this:
I read in previous posts (below) that you need to set AVKey.SERVICE, so I used http://localhost as recommended. This will fail, since I’m not running a web server locally. I shouldn’t need to, right? I read about the php server, but didn’t want to go down that road, unless that’s the only way.
private static LevelSet makeLevels()
AVList params = new AVListImpl();
params.setValue(AVKey.DATA_CACHE_NAME, "MyLocalData"); // also tired MyLocalData/
params.setValue(AVKey.NUM_LEVELS, 5); // this value was taken from xml file generated by GlobalMapper
params.setValue(AVKey.NUM_EMPTY_LEVELS, 0); // not sure what this should be?
// Not sure if I'm setting this up right?
params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, new LatLon(Angle.fromDegrees(36d), Angle.fromDegrees(36d)));
return new LevelSet(params);
Any guidance is much appreciated!
: Just make sure the layer points to the right cache folder. SERVICE and DATASET_NAME should never be needed if WW finds the images at the expected place in the cache, but you need to provide these parameter so use something like "http://locahost" for the service and "*" for the dataset name for instance. That should work. You'd better set the bounding sector of your layer properly to avoid WW looking for tiles outside the layer extent too.