export raster mip maps

TibTib Global Mapper UserPosts: 9
edited November 2012 in Raster Data
Hello,

I would like if there is an easy way to export mipmaps of a raster dataset.

I know I can export a downsampled version with a box average 2x2 but currently I have to do this for each mipmap level... Would the best way to do this be by scripting?

Thank you!

Thibaud

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited October 2012
    Thibaud,

    Most of the web format exports are basically mipmaps (though separated and not all in a single image), such as Google Maps, OSM, TMS, etc. However you can't export a web format in a script. Currently you would just need an extra export command in your script for each zoom level, or you could potentially using variable looping (new in v14, see http://www.globalmapper.com/helpv14/ScriptReference.html#cmd_var_loop_start) to loop over each zoom level and export it automatically.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • TibTib Global Mapper User Posts: 9
    edited November 2012
    Hello Mike,
    Thanks for the answer.

    It's not exactly this kind of mipmap that I want to generate. In fact, I want to build lower-res versions of my raster dataset (for example if my dataset is 1000x1000 pixels, I build 500x500, 250x250, 125x125 versions).

    Each version would be an average 2x2 based on previous resolution (500 based on 1000, 250 based on 500, etc...).

    I think it's the same thing that gdal "overviews" (which are build with gdaladdo command).

    I was looking for a way to automate all the process in global mapper, because for now I have to wait for each generation to launch next generation.

    I have another question: when I use resampling using average 2x2 box, my nodata values (black) are averaged with other colors which is not good... Is there a way to filter nodata values when resampling?

    Thanks!

    Thibaud
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2012
    Thibaud,

    You could automate this in a script, but there isn't a way in the user interface. There is already some overview support when exporting Erdas Imagine files, with GeoTIFF overviews coming soon.

    For the black values, do you have your nodata values marked so that the black is transparent and not just a valid part of the image that just looks to be black?

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • TibTib Global Mapper User Posts: 9
    edited November 2012
    My dataset is black all around the raster data.

    But it looks like nodata value is not specified in the metadata. I'm gonna set the nodata value (I know how to do it with GDAL but is it possible with Global Mapper?). Will the nodata value be taken in consideration when downsampling the dataset?


    I discovered another phenomena today, I have two ways of reprojecting my data (a set of geotiff files):

    1) import the files, reproject via Tools/configure, then export raster (a rectangle containing all the data)
    2) batch reproject all geotiff files

    I prefer the 2nd way as I get as many output files as input files, but when I use the 2nd way, I get black lines around each tile...

    It looks like I get nodata all around each tile, is there a way to avoid this?

    Thank you!

    Thibaud
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2012
    Thibaud,

    Assuming the data is all consistently black outside your actual data you can simply make black transparent for your images, either through the raster options dialog for the layers, or if batch converting using the checkbox option to make a color transparent. Any no-data values (either built-in or from transparency) will be ignored when resampling, so they won't affect the resulting colors.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
Sign In or Register to comment.