Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoTIFFs not correctly hidden on zoom out #40

Open
ianrenton opened this issue Aug 15, 2017 · 1 comment
Open

GeoTIFFs not correctly hidden on zoom out #40

ianrenton opened this issue Aug 15, 2017 · 1 comment

Comments

@ianrenton
Copy link

ianrenton commented Aug 15, 2017

Hi,

I posted about this on the mailing list maybe a year ago, but having encountered the problem again I thought I'd post on the issue tracker.

When viewing GeoTIFF imagery on an ImageTileLayer, the images are only supposed to be displayed once you are zoomed in far enough. Once you zoom out past a certain level, a grey box is displayed instead, showing the geographical extent of the image. I assume at this point the image itself is supposed to be hidden, however, it continues being displayed at the same on-screen pixel size that it was before zooming out. The result is that you get a false impression of the geographical size of the image, where it appears much bigger geographically than it really is. The following image illustrates the problem:

Example

Steps to reproduce:

  1. Using OpenMap 5.1.15, include the JAI JARs and static libraries required for GeoTIFF display on the path/classpath
  2. Add an ImageTileLayer, e.g. in openmap.properties:
openmap.layers=(...) geotiff
openmap.startUpLayers=(...) geotiff
geotiff.class=com.bbn.openmap.layer.imageTile.ImageTileLayer
geotiff.prettyName=GeoTiffs
  1. Run OpenMap
  2. Edit the ImageTile layer, click Add and locate a GeoTIFF file (see below for example).
  3. Once the file appears in the list, select it and click "Go To" to zoom to the location of the GeoTIFF at its best-fit size
  4. Zoom out at least twice using the on-screen "-" button.

I have also encountered the issue using programmatically created ImageTiles, so I am wondering if the issue is somewhere around ImageTile's updateImageForProjection() / shouldFetchForProjection() methods, but I can't see an obvious path by which it could display both the image and the grey box. Is it maybe keeping the image graphic in the layer's graphic list and not removing it when the projection no longer requires it to be rendered?

(I have uploaded an example GeoTIFF file here for you to try if you don't have a suitable file. The image was converted for OpenMap from the US government open data set available here.)

@dfdietrick
Copy link
Contributor

Thanks for all the information (and for the previous note, I haven't forgotten). I'm working on the next release, I'll check this out within the next week or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants