![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Junior Member
Join Date: Apr 2008
Posts: 5
![]() |
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: Code:
private static LevelSet makeLevels()
{
AVList params = new AVListImpl();
params.setValue(AVKey.TILE_WIDTH, 512);
params.setValue(AVKey.TILE_HEIGHT, 512);
params.setValue(AVKey.DATA_CACHE_NAME, "MyLocalData"); // also tired MyLocalData/
params.setValue(AVKey.OFFLINE_MODE, true);
params.setValue(AVKey.SERVICE, "http://locahost");
params.setValue(AVKey.DATASET_NAME, "*");
params.setValue(AVKey.FORMAT_SUFFIX, ".jpg");
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)));
params.setValue(AVKey.SECTOR, Sector.FULL_SPHERE);
return new LevelSet(params);
}
Quote:
- Ken Last edited by patmurris; 10-30-2008 at 11:27 PM. |
|
|
|
|
|
|
#2 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
You setting for the layer looks good, however you should certainly check the LEVEL_ZERO_TILE_DELTA value and make sure you use the right one. Is you dataset global (full sphere/globe) and jpg format?
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Apr 2008
Posts: 5
![]() |
No, it's not a global dataset; I will have to look into setting that. Yes, it's jpg format.
I took a closer look at the files generated by GlobalMapper and I think the folder structure is wrong. It creates a structure like MyLocalData/1/12124/12124_38079.jpg. It seems like WWJ is requesting things like MyLocalData/1/3/3_2.jpg. Hmm... not sure what GlobalMapper is doing. Maybe I'll need to use the dstile tool? |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Apr 2008
Posts: 5
![]() |
Actually, it looks like that format is correct. Hmm.. something else must be going wrong.
|
|
|
|
|
|
#5 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
MyLocalData/1/12124/12124_38079.jpg is OK except the numbers are for much smaller tiles then with a LZTD of 36 degrees.
What seems to be wrong in your settings is the LZTD and the dataset sector. Did you see this: http://issues.worldwind.arc.nasa.gov...le+systemt.gif |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Apr 2008
Posts: 5
![]() |
Sweet.... that's what was wrong. Needed to change to:
Code:
params.setValue(AVKey.LEVEL_ZERO_TILE_DELTA, new LatLon(Angle.fromDegrees(45d), Angle.fromDegrees(45d))); |
|
|
|
![]() |
| Tags |
| cache, cache pack, local data |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vertical resolution | turman | Development Help | 22 | 10-12-2007 12:07 PM |
| I can't see WMS data with Worldwind 2.1 and Local Geoserver WMS | vash | Development Help | 15 | 07-10-2007 06:25 PM |
| WW mentioned in article | KoS | WorldWind General | 5 | 01-18-2006 04:23 PM |
| Using local higher res terrain data? | vizda | Image Serving & GIS | 0 | 01-06-2006 02:13 AM |
| What to do with all my local data? | muzietto | WorldWind General | 3 | 03-18-2005 12:49 AM |