Re: [OpenMap Users] ImageTileLayer with large images

From: dfdietrick <dfdietrick_at_gmail.com>
Date: Mon, 11 Oct 2010 14:47:07 -0400

Hi Pete,

The ImageTileLayer is at the mercy of JAI, and there are some images that, for some reason, take a while to read. I haven't found out what the difference is between these image and other images that load and display quickly.

For your situation, I think there is another solution - the beta version has a new layer, the com.bbn.openmap.layers.imageTile.MapTileLayer, which uses map tiles like OpenStrretMap and Google maps. You can use GDAL to make the tiles out of your images, using gdal_merge and gdal2tiles.py. The layer was originally designed to use tiles from OpenStreetMap, which numbers the tiles a little differently than Google's layout (y origins are different). I think the latest version in the repository has the modification that lets the gdal tiles be used, if it doesn't there will be an update checked in tomorrow. The difference is, you have to add a transform to the layer so it can figure out the right way to look up tiles for lat/lons. Details are/will be in the javadocs for the layer.

You can get the beta via svn, instructions on the download page at http://openmap.bbn.com.

Let me know if you have questions, I'm running around today and will get back you later, otherwise I'd give you more details.

Hope this helps,

Don

On Oct 11, 2010, at 1:58 PM, Pete Flugstad <pete.flugstad_at_gmail.com> wrote:

> I've got 250 2MB of image files - they're BMP's with essentially
> WorldFile data with them.
> They're tiled over a fairly large area. I'm loading into OpenMap
> using the ImageTileLayer.
> And well, it's not performing very well.
>
> The first thing I noticed is that the
> WorldFileImageReader.getImageTile is loading the buffered
> image of every image, even if that image is never displayed or visible
> in the current projection.
> So, I commented that out and that helped a lot.
>
> Now however, when the projection needs to load the images, it's
> calling getBufferedImage
> on each one, which again takes a long time. I've tried playing with
> the imageCutoffScale
> (BTW, the JavaDoc for that probably needs updated - it looks like it's
> a ratio instead of
> a scale now), and I can't seem to figure out how to get it to stop
> loading all the images,
> even if they are not visible. Is there a way to set this up so that
> once the scale gets out that
> the image isn't loaded and you only see an outline of the image?
> Ideally, I'd set this so
> I'd never see more than probably 9 images at a time - once I scale up
> beyond seeing 9,
> I just get the outline. Is that kind of thing possible?
>
> Also, the background property in Layer - is that meant to work
> standalone, or do I need to
> create a BufferedLayer and put the layers i want to buffer in it?
>
> Thanks,
> Pete
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe openmap-users"]

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Oct 11 2010 - 14:46:36 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT