Export layers as files
Marco N
Global Mapper User
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:

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
-
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 -
I use GM 19.1, I have tried your suggestion but the result doesn't change. Thanks for now.
Howdy, Stranger!
Categories
- 12.2K All Categories
- 5.3K Features Discussion
- 312 Downloading Imagery
- 1.2K Elevation Data
- 371 Georeferencing Imagery Discussion
- 580 GM Script Language
- 42 User Scripts
- 111 GPS Features
- 388 Projection Questions
- 788 Raster Data
- 1.3K Vector Data
- 6.4K Support
- 159 Announcement and News
- 881 Bug Report
- 554 SDK
- 1.1K Suggestion Box
- 3.6K Technical Support
- 520 Other Discussion
- 125 GIS Data Sources
- 26 Global Mapper Showcase
- 217 How I use Global Mapper
- 99 Global Mapper Forum Website