Magic naming for presimplified geometry columns #88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
EXPERIMENT
This adds support for a magic naming convention to use a certain geometry column at certain zoom levels.
A column geom_z7 has been added to the test table landsat_wrs in landsat_wrs.sql that has been simlified to a level that is appropriate at zoom levels <= 7.
If the geometry column is set to "geom" either by it being set via the geom parameter or being the first in geometry_columns, this will look for any other geometry columns that start with "geom" and end with _z[0-9]+. It will then look at the current zoom level and use the _z layer if it is appropriate.
So, for the example of landsat_wrs that has two geometry columns "geom" and "geom_z7" it will use the geometry from geom_z7 for zoom levels 1-7 and then switch to using "geom" for zoom levels greater than 7.