World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 05-18-2011, 10:19 AM   #1
ayman
Junior Member (Java Lover)
 
Join Date: Feb 2008
Posts: 189
ayman is on a distinguished road
Default Basic WWJ

I want to display Satellite imagery and some layer rendering only. there is many classes that will not be used in my project. is there any basic version contains only the basic functionality of viewing and rendering the satellite images.
or is there any tools that track the user classes starting from the main Class, and delete other unused classes.
ayman is offline   Reply With Quote
Old 05-18-2011, 10:40 AM   #2
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

That question is ambiguous as to what you are looking for but will try and answer.

NO, one SDK download fits all.

YES, you can start with something very basic like ...\src\gov\nasa\worldwind\examples\Hell oWorldWind.java and add only the layers you want.

A workspace with the full SDK is ~300MB and a .jar is ~8.6MB.
To deploy I delete stuff out of the workspace to get it to ~60MB and the .jar is ~4.9MB.
There is no way to delete stuff automatically that I have found.

With the FAA Charts I have a total of about 35 layers.
__________________
Neil
http://www.nlneilson.com

Last edited by nlneilson; 05-18-2011 at 12:02 PM.
nlneilson is offline   Reply With Quote
Old 05-20-2011, 09:51 AM   #3
what_nick
Worldwind Developer
 
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
what_nick is an unknown quantity at this point
Default

You can use a tool like Proguard , which is a Java code minimiser, to analyse your application from the main class out to remove all unused bits of the API. However these tools may fail to detect some dynamically loaded classes etc and make your application unstable, so test and test again before you ship.

Cheers,

whatnick.
__________________
Coding This and That in World Wind and helping new people out, as long as they don't pester too much.
Currently blogging at: http://whatnicklife.blogspot.com
Working at:
Aerometrex - http://aerometrex.com.au/blog/
Impact so far:


what_nick is offline   Reply With Quote
Old 05-20-2011, 10:16 AM   #4
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

Thanks whatnick for the link!

I downloaded and when I get a chance I will try it.
Right now I am trying to compile your dstile code in MSVC 10 and/or Ultimate++.
__________________
Neil
http://www.nlneilson.com
nlneilson is offline   Reply With Quote
Old 05-20-2011, 03:41 PM   #5
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

whatnick

I tried Proguard, obviously I don't know how it is used but I think without including the jogl .jars is a big issue. My WWJ app just has jogl.dll and jogl_awt.dll in the same directory. Plus I have Java 1.7 but did use the "-target 1.6". Also the MyLayers.xml, DataFileStore.xml files and the directory that contains the individual .xml layers could be a problem for references as I want to keep them external to the WWJ app.jar.

Code:
Warning: there were 171450 unresolved references to classes or interfaces.
         You may need to specify additional library jars (using '-libraryjars').

Warning: there were 1165 unresolved references to program class members.
I don't think I will pursue that further.

Did you ever get a WWJ app to run correctly after using Proguard??
__________________
Neil
http://www.nlneilson.com

Last edited by nlneilson; 05-21-2011 at 10:39 AM.
nlneilson is offline   Reply With Quote
Old 05-22-2011, 07:11 AM   #6
what_nick
Worldwind Developer
 
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
what_nick is an unknown quantity at this point
Default

Hi Neil,

Setting up libraryjars is like setting up classpath in a compiler/IDE. Proguard with worldwind does indeed work. The xml's are resolved relative to where worldwind is launched from or where worldwind.jar lives. I believe you can keep them external to the jar.

Regarding dstile, I left the company in the hands of a liquidator so repository with my code probably got blown away. The current wisdom says use the ImageryAndElevation import demo code to leverage the gdal libraries via Java. I suggest letting dstile fall into legacy and using this route instead.

Cheers,

whatnick.
__________________
Coding This and That in World Wind and helping new people out, as long as they don't pester too much.
Currently blogging at: http://whatnicklife.blogspot.com
Working at:
Aerometrex - http://aerometrex.com.au/blog/
Impact so far:


what_nick is offline   Reply With Quote
Old 05-22-2011, 12:01 PM   #7
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

Hi whatnick

It's good to know Proguard does work with a WWJ app.
I will try later but with a very simple app first.
My app is a bit complicated so may need to work any glitches out one at a time.
Most of my code that controls the WWJ app has been ported to C++ and works great.


http://www.nlneilson.com/wwposts/UppTree_6.jpg
http://www.nlneilson.com/wwposts/UppTree_7.jpg

I was able to find a link with your dstile code but my knowledge of working with MSVC IDE is limited, I just don't like using it. I use Ultimate++ for my C++.

I decided to go another route using gdal directly in FWTools/OSGeo4W.
gdal_merge works OK and I am changing gdal2tiles so an lztd can be fed in as a parameter rather than the default 180 degrees.

I will look at the ...\examples\dataimport\ImportingImagesA ndElevationsDemo.java

I have used your dstile considerably in the past for the FAA Charts.
THANKS for that.
__________________
Neil
http://www.nlneilson.com

Last edited by nlneilson; 05-22-2011 at 01:34 PM. Reason: add path to import demo
nlneilson is offline   Reply With Quote
Old 05-22-2011, 04:30 PM   #8
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

I tried the Import Demo code, it works good and posted a few notes here at #9:
http://forum.worldwindcentral.com/sh...4174#post94174
__________________
Neil
http://www.nlneilson.com
nlneilson is offline   Reply With Quote
Old 05-22-2011, 09:27 PM   #9
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

I had a hard time debugging through the Import code to find where some things were done.

The .xml that is made shows this for the lztd:
Code:
- <LevelZeroTileDelta>
  <LatLon latitude="4.69540 31335 80968" longitude="5.656231126309227" units="degrees" />

and on another one 

  <LatLon latitude="4.696246714776091" longitude="5.500012666237986" units="degrees" />
I don't think I want to go that route.
I want to specify an lztd as 1.0, 2.0, 5.0, 10.0, etc..

I will just finish modifying gdal2tiles.
__________________
Neil
http://www.nlneilson.com
nlneilson is offline   Reply With Quote
Old 05-29-2011, 09:59 PM   #10
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

I was able to make a few changes to gdal2tiles.py
Downloaded Klokan's version that supports the .jpg format and made that the default.
Made geodetic the default
Couldn't turn off making the .kml so just deleted that code
Changed the naming convention
Code:
#	return os.path.join(str(tz), str(tx), "%s.%s" % (ty, extension))
	return os.path.join(str(tz), str(ty), "%s_%s.%s" % (ty, tx, extension))
The changes were made in Notepad++ since PyScripter with Python 3.2 or 2.7 wouldn't work with the gdal code so may need to try Python 2.4 or 2.5.

Placed some tiles in my cache but could not display them.
Put them on my website and could download and display them in a WWJ app with a url like this:
http://nlneilson.com/serv/FAA/TAC/te...52/352_175.jpg ...\9\352\352_175.jpg

But they were saved in the cache as \0\352\352_175.jpg rather than \9\352\352_175.jpg

Strange that the WWJ code changes the levels from 9 to 0

My error???
__________________
Neil
http://www.nlneilson.com

Last edited by nlneilson; 05-30-2011 at 02:59 AM.
nlneilson is offline   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
How to setup WWJ Hervé Development Help 96 03-04-2013 03:42 PM
Embed wwj in JavaFx !!! ghazi Development Help 0 04-05-2011 11:53 PM
WWJ Kml basic implementation v1.0 cmaxwell Development Help 20 12-09-2009 07:55 AM
WW(J) and Python - some questions GIS_Jon Development Help 0 06-03-2009 08:25 PM
WW(J) and Python - some questions GIS_Jon WorldWind General 0 06-02-2009 02:50 PM


All times are GMT +1. The time now is 01:30 PM.


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