Skip to content

Leaflet, QGIS, GDAL 1 minute start

Carlo Palermo edited this page Jun 8, 2017 · 2 revisions

For start mapping, you need to get a new Basemaps API key through the user Dashboard

If you are new, you can follow the Dashboard Walkthrough

Leaflet quick-start example

For running an interactive web map using Leaflet, you can start with this example file:

index.html [download raw file]

Edit the tiles URL (line 48) adding your key:

var Url = 'https://tile.sentinelmap.eu/2016/summer/rgb/{z}/{x}/{y}.jpg?key=_my-sentinelmap-key_';

Now you can open it with your browser or deploy on the web.

Accessing tile layer using the WMS format in GDAL

Accessing the service is also possible using the WMS format in GDAL. Service is accessed by using this local service description XML file:

wms_sentinelmap.xml [download raw file]

Edit the tiles URL (line 3) adding your key:

<ServerUrl>https://tile.sentinelmap.eu/2016/summer/rgb/${z}/${x}/${y}.jpg?key=_my-sentinelmap-key_</ServerUrl>

Now you can open it as raster layer with QGIS.

Or save an image with 'gdal_translate', usage examples:

gdal_translate -of GTIFF -outsize 100% 100% -projwin 1368500 5693500 1378500 5687500 -CO "TILED=YES" -CO "COMPRESS=JPEG" -CO "JPEG_QUALITY=75" -CO "PHOTOMETRIC=YCBCR" wms_sentinelmap.xml Venice.tif
gdal_translate -of GTIFF -outsize 1% 1% -projwin 640000 6040000 1520000 5460000 -CO "TILED=YES" -CO "COMPRESS=JPEG" -CO "JPEG_QUALITY=75" -CO "PHOTOMETRIC=YCBCR" wms_sentinelmap.xml Alps.tif