Error with black margins generating MBTILES

Hello good day

I am new to this forum and thank you in advance for any help you can provide.

My query is due to a problem that is occurring with version 18.1.0 of global mapper when trying to make a creation of MBTILES files using a script using the option EXPORT_WEB starting from files in ECW format (EPSG 4326). The script used is the following:

GLOBAL_MAPPER_SCRIPT VERSION=1.00

DIR_LOOP_START DIRECTORY="D:\ORTOFOTOS\PRUEBA\" FILENAME_MASKS="*.ECW" RECURSE_DIR=YES 

IMPORT FILENAME="%FNAME_W_DIR%"

EXPORT_WEB FILENAME="D:\ORTOFOTOS\PRUEBA\%FNAME_WO_EXT%\%FNAME_WO_EXT%.mbtiles"\ 

TYPE="MBTILES" MAX_ZOOM_LEVEL="18" NUM_ZOOM_LEVELS="5" MBT_MAP_TYPE="basemap"\

MAP_NAME="%FNAME_WO_EXT%" IMAGE_FORMAT="JPG"  \

QUALITY="75" TILE_SIZE="256" WEB_FULL_TILES_ONLY="YES"

// Unload the loaded data

UNLOAD_ALL

DIR_LOOP_END


The result obtained is a base with black edges from the minimum zoom to the maximum, despite having used the option "WEB_FULL_TILES_ONLY =" YES .


When the same file is loaded manually in the application and we export using the EXPORT WEB FORMAT option with the options marked "Only Export Fully Covered Tiles" in the "Tilling options" and "All Loaded Data" tab in the "Export bounds" tab, the result is a black borderless base at any zoom level, Which was the desired effect.



I do not know if there is anything that escapes me from putting in the script or something that is incorrect.

Many thanks to everyone who can lend a hand, because I do not know what I can do.  

Best Answer

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 1,686
    Answer ✓
    Hello,

    I suggest using IMAGE_FORMAT="PNG" with WEB_TRANSPARENT_TILES="YES".

    Cheers,
    Bob

Answers

  • fennino72fennino72 Posts: 6
    Hi
    Thank you very much. Tomorrow I try and comment on the result.
  • fennino72fennino72 Posts: 6
    Hello again

    Effectively, performing the changes indicated in the script has worked. The only problem is that when using the PNG format, the resulting base size is multiplied by 10. Ideally, the WEB_TRANSPARENT_TILES = "YES" option should also work with the JPG extension or the WEB_FULL_TILES_ONLY = "YES" option should work For script mode as it works from the export wizard.

    Thanks again for the reply and a greeting.
  • bmg_bobbmg_bob Global Mapper Programmer Posts: 1,686
    fennino72 said:
    Effectively, performing the changes indicated in the script has worked. The only problem is that when using the PNG format, the resulting base size is multiplied by 10. Ideally, the WEB_TRANSPARENT_TILES = "YES" option should also work with the JPG extension or the WEB_FULL_TILES_ONLY = "YES" option should work For script mode as it works from the export wizard.

    Hello,

    The JPG format does not support native transparency, so the transparent tiles option only works with PNG output (the PNG format does support native transparency.)  As far as I can tell in my test, the WEB_FULL_TILES_ONLY = "YES" option is working as expected.  It sounds like you are getting a different result.  I suggest getting the latest daily build.  It is possible that you are running into a bug that has been fixed.

    Cheers,
    Bob

  • fennino72fennino72 Posts: 6

    Hello

    Many thanks again for your answers. I'll do the ones you say and as soon as I have results, I comment.

    regards

  • fennino72fennino72 Posts: 6
    Good afternoon

    He had pending revision of this subject with an updated version of the daily compilations. Indeed, using the May 22nd compilation, the problem of black borders in the MBTILES databases generated by script in JPG format with the WEB_FULL_TILES_ONLY = "YES" option works correctly. It was therefore a bug in the version I was using that has already been resolved.

    Many thanks for the answers that have been a major help.

    regards
Sign In or Register to comment.