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 06-27-2008, 12:27 AM   #1
eenglund
Junior Member
 
Join Date: Apr 2008
Posts: 7
eenglund is on a distinguished road
Default Large SurfaceImage

Does anyone know how to draw a large high resolution SurfaceImage. I have an image that is very large 2400x2400 or larger. Whenever I try to draw the image on the world with SurfaceImage it either shows up distorted or doesn't show up at all. Any ideas.
eenglund is offline   Reply With Quote
Old 06-27-2008, 01:27 AM   #2
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

There is an automatic tiling process in the plans to address exactly that problem. In the mean time, the best approach it to split you image into smaller parts and use one surface image for each. Make them 1024x1024 for instance.

However, as your image is not that huge, you may simply try to shrink it just a bit, down to 2048x2048. It may work.
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 06-27-2008, 01:40 AM   #3
eenglund
Junior Member
 
Join Date: Apr 2008
Posts: 7
eenglund is on a distinguished road
Default

Thanks. Unfortunately, precision and accuracy are paramount in my application and losing clarity by shrinking the image would not be an option, especially since some of the images can be as large as 4800x4800.

I eagerly await the automatic tiling solution, but for now I guess I will have to try and create my own.
eenglund is offline   Reply With Quote
Old 06-27-2008, 02:00 AM   #4
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

Here is the current SurfaceImage class - still a number of TODOs, but have a look at the last method: tileImage().
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 06-27-2008, 02:20 AM   #5
eenglund
Junior Member
 
Join Date: Apr 2008
Posts: 7
eenglund is on a distinguished road
Default

Ok I think I get what you want me to do, I'll give it a try.
eenglund is offline   Reply With Quote
Old 06-27-2008, 04:56 AM   #6
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

Here is some code bits to use the tileImage() method in the context of a RenderableLayer:
Code:
// Given an imagePath and a sector
File imageFile = new File(imagePath);
BufferedImage image = ImageIO.read(imageFile);

ArrayList<SurfaceImage.ImageSector> images =
              SurfaceImage.tileImage(image, sector);

for (SurfaceImage.ImageSector is : images)
{
    SurfaceImage si = new SurfaceImage(is.image, is.sector, this);
    si.setOpacity(this.getOpacity());
    this.addRenderable(si);
}
__________________
My World Wind Java Blog & WW.net Plugins page

Last edited by patmurris; 06-27-2008 at 05:01 AM.
patmurris is offline   Reply With Quote
Old 06-27-2008, 02:40 PM   #7
eenglund
Junior Member
 
Join Date: Apr 2008
Posts: 7
eenglund is on a distinguished road
Default

Not to try and make your life any harder but how would I title an image that needed to be rotated. I've seen some posts on how to plot a single surface image and rotate it but this would be much more complicated.
eenglund is offline   Reply With Quote
Old 06-27-2008, 04:35 PM   #8
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

I hoped we would not get to that, but the problem becomes a more general issue of projecting or 'casting' any image on the globe taking into account it's original projection. For now WWJ can only deal with plate carrée projected images, so whatever the source is you will have first to reproject it to the equitrectangular projection. There are a number of tools to do that...
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 07-03-2008, 09:56 PM   #9
baellwe
weekend warrior
 
Join Date: May 2008
Posts: 95
baellwe is on a distinguished road
Default

When will this enhanced functionality be available? I would like to include this in my project and am wondering if I should just grab the linked code and integrate it as is or simply wait for the next release?
baellwe is offline   Reply With Quote
Old 07-03-2008, 10:24 PM   #10
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

Asking 'when will the next release be out' will not likely get you any idea Get the code now, it will likely be in the next release. Arbitrary reprojection has not been tackled yet. It may come to involve fragment shaders? There are still many things to look into.
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris 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
SurfaceImage reloaded... asantiago Development Help 0 11-26-2007 11:24 PM
Movable SurfaceImage asantiago Development Help 0 11-21-2007 08:38 PM
Updated SurfaceImage asantiago Development Help 3 11-20-2007 10:33 PM
Adding a large database of place names fabrizio.giudici Development Help 0 10-06-2007 05:55 PM
Generating tiles from custom large image for WW shaheryar Image Serving & GIS 6 10-16-2006 05:00 PM


All times are GMT +1. The time now is 06:27 PM.


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