![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Apr 2008
Posts: 7
![]() |
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.
|
|
|
|
|
|
#2 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
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. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Apr 2008
Posts: 7
![]() |
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. |
|
|
|
|
|
#4 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
Here is the current SurfaceImage class - still a number of TODOs, but have a look at the last method: tileImage().
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Apr 2008
Posts: 7
![]() |
Ok I think I get what you want me to do, I'll give it a try.
|
|
|
|
|
|
#6 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
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);
}
Last edited by patmurris; 06-27-2008 at 05:01 AM. |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Apr 2008
Posts: 7
![]() |
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.
|
|
|
|
|
|
#8 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
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...
|
|
|
|
|
|
#9 |
|
weekend warrior
Join Date: May 2008
Posts: 95
![]() |
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?
|
|
|
|
|
|
#10 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
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. |
|
|
|
![]() |
| 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 |
| 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 |