Export layers as files

Marco NMarco N Global Mapper UserPosts: 4
Hi, I'm trying to export each layer to a file (MBtiles format). The setting of Tiling Option below does not produce borders around the final maps, while the script produces a black borders. Should not they have the same output?




The script is:

GLOBAL_MAPPER_SCRIPT VERSION=1.00

// Hide all layers apart from the raster to be exported
LAYER_LOOP_START FILENAME="*" VAR_NAME_PREFIX="HIDE"
    SET_LAYER_OPTIONS FILENAME="%HIDE_FNAME_W_DIR%" HIDDEN=YES
LAYER_LOOP_END

// Loop over the loaded layers, doing a separate export for each
LAYER_LOOP_START FILENAME="*"    
    // Enable the current layer since we hid it above
    SET_LAYER_OPTIONS FILENAME="%LAYER_FNAME_W_DIR%" HIDDEN=NO
    
// Export to MBTILES
EXPORT_WEB FILENAME="C:\1\MBTILES\%LAYER_FNAME_WO_EXT%.mbtiles" \ 
TYPE="MBTILES" MAX_ZOOM_LEVEL="0" NUM_ZOOM_LEVELS="5" \
MBT_MAP_TYPE="BASEMAP" IMAGE_FORMAT="JPG" QUALITY="80" \
TILE_SIZE="256" WEB_TRANSPARENT_TILES="YES"
    
// Disable the current layer so it won't be involved in other operations
    SET_LAYER_OPTIONS FILENAME="%LAYER_FNAME_W_DIR%" HIDDEN=YES
LAYER_LOOP_END

// Unhide all layers
LAYER_LOOP_START FILENAME="*" VAR_NAME_PREFIX="HIDE"
    SET_LAYER_OPTIONS FILENAME="%HIDE_FNAME_W_DIR%" HIDDEN=NO
LAYER_LOOP_END
Tagged:

Comments

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 1,944
    Hello,

    What version of Global Mapper are you using?

    The export parameters for the Maximum Zoom Level and JPG Quality do not match in your screen capture and script. If changing that does not solve the problem, I suggest that you contact Blue Marble Support directly via email (geohelp@bluemarblegeo.com). Please include a detailed description of your workflow (including screen capture of your MBTiles options and your script), data that can be used to reproduce the problem, and a screen capture of the result you are seeing.  Thank you.

    Cheers,
    Bob
  • Marco NMarco N Global Mapper User Posts: 4
    I use GM 19.1, I have tried your suggestion but the result doesn't change. Thanks for now.
Sign In or Register to comment.