0

I'm trying to configure MapServer to serve a Cloud Optimized GeoTIFF (COG) through WMS service and would like to fully leverage the advantages of this format (tiled access, improved performance, etc.).

I currently have a basic Mapfile working, but I'm not sure if I'm correctly configuring the specific parameters for optimal COG performance without implying conversions.

My current Mapfile:

MAP DEBUG 5 CONFIG "CPL_DEBUG" "OFF" CONFIG "MS_ERRORFILE" "/tmp/logs/ortofoto_2025.log" DEFRESOLUTION 96 EXTENT -8238903.705 519346.255 -8238464.290 519797.026 FONTSET "../templates/font.list" SYMBOLSET "../templates/symbols.sym" IMAGETYPE "png24" NAME "Ortofoto 2025" RESOLUTION 96 SIZE 808 884 STATUS ON UNITS DD OUTPUTFORMAT NAME "GEOTIFF" DRIVER "GDAL/GTiff" MIMETYPE "image/tiff" IMAGEMODE RGB EXTENSION "tif" END PROJECTION "init=epsg:3857" END WEB METADATA "distance_units" "MS_METERS" "mapmanager_version" "1.1.0.0" "coordsys_name" "WGS 84 / Pseudo-Mercator" "ows_contactperson" "Samuel Mesa" "ows_keywordlist" "ortofoto2021" "ows_city" "Bogotá" "ows_srs" "EPSG:4686 EPSG:4326 EPSG:9377 EPSG:3857 EPSG:9377 EPSG:6247" "distance_units" "MS_METERS" "ows_contactposition" "Profesional SIG" "ows_contactelectronicmailaddress" "[email protected]" "wms_service_onlineresource" "https://localhost" "wms_stateorprovince" "Bogotá D.C." "wms_role" "Profesional SIG" "wms_title" "Servicio WMS Ortofoto" "wms_country" "Colombia" "wms_onlineresource" "https://localhost/mapserv/?map=ortofoto2021" "wms_fees" "Ninguno" "wms_enable_request" "*" "wms_format" "image/geotiff" "wms_encoding" "ISO-8859-15" "wms_contactinstructions" "Vía correo electrónico" "wms_accessconstraints" "Aplica licencia de datos abiertos de IDECA" "wms_abstract" "Servicio WMS Ortofoto." END IMAGEPATH "/tmp/" TEMPPATH "/tmp/" END LAYER NAME "ortofoto2021" TYPE RASTER DATA "ortofoto2021.tif" STATUS on PROCESSING "BANDS=1,2,3" PROCESSING "SCALE=AUTO" PROCESSING "CLOSE_CONNECTION=IF_FINAL" PROCESSING "LINESCAN=OFF" PROJECTION "init=epsg:3857" END EXTENT -8238903.705 519346.255 -8238464.290 519797.026 METADATA "wms_srs" "EPSG:3857" "wms_title" "Ortofoto 2021" "wms_enable_request" "*" END END END 

I'm seeking guidance on the optimal MapServer configuration to efficiently serve a GeoTIFF COG through WMS. Specifically, I need to know what additional GDAL CONFIG parameters are required for proper COG format handling, whether I should include specific PROCESSING directives in the LAYER section to optimize tile reading, if the current OUTPUTFORMAT and WMS metadata configuration is appropriate to leverage COG advantages, what specific metadata I should add to improve service discovery, and what are the best practices for parameters like EXTENT and SIZE when working with this format.

1
  • 1
    SIZE and EXTENT has nothing to do with speed. EXTENT must match with your data and SIZE is what you want to serve (though if you use MapServer for WMS the SIZE does not really have much effect). And COG is by nature optimal for MapServer. PROCESSING directives are probably not needed for your use case and could be deleted. I believe you have alreasy quite optimal WMS. At least I cannot recommend any changes that would certainly make the service faster. Speed tests with jmeter or similar software would be required. Commented Nov 6 at 14:18

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.