nasa-gibs / onearth

High-performance web services for tiled raster imagery and vector tiles
Apache License 2.0
178 stars 47 forks source link

ONEARTH-665 Use layer's WMTS source via the GDAL TMS driver in mapfiles #145

Closed jtroberts closed 3 years ago

jtroberts commented 3 years ago

oe_configure_layer will use the layer's WMTS source (if it exists) for WMS mapfiles by leveraging oe_configure_reproject_layer. Otherwise it will still point to MRF files on disk. This plays a lot nicer with time snapping.

Possibly more changes to come in ONEARTH-665 if we need a more thorough solution.

mcechini commented 3 years ago

Couple potential issues:

  1. This assumes that we've build the EPSG:3857 endpoint first, which we may not be able to guarantee.
  2. It is configuring all layers for WMTS based WMS, when we need a way to do that for only specific layers.

How about this... what if the oe_configure_remote_layers.py script also created the mapfiles for remote layers (if create_mapfile==true). That seems consistent with what the oe_configure_reproject_layer.py script does. Then the oe_configure_layer.py script would continue to create mapfiles as it was already doing for all XML layer configuration files. We would not deploy a layer configuration file for a layer that is found remotely... and if we do, then that's our bad and the oe_configure_layer.py script would simply overwrite with a new mapfile (reading from MRF). We could log a SigEvent warning for that overwrite situation perhaps.

jtroberts commented 3 years ago

@mcechini I made the modifications as you suggested. One thing to note is that this will negate the fix for ONEARTH-611 for any layers that aren't included in the list of remote layers (since the solution to that issue is to use a WMTS layer source).