nsidc / qgreenland

Source code for generating the QGreenland package hosted at https://qgreenland.org/
https://qgreenland.readthedocs.io
Other
36 stars 9 forks source link

Cleanup OBE references to `gdal_remote` and "Online" QgsLayerType #728

Closed trey-stafford closed 1 year ago

trey-stafford commented 1 year ago

Description

Title. Related to #655.

The handling of the term "online" is a bit messy. For example, we have a function called vector_or_raster that is typed to return one of "Raster", "Vector", or "Online", but our mapping from provider -> layer type doesn't include "Online", so vector_or_raster will only return what its function name indicates - "Vector" or "Raster".

The only place we appear to use the "Online" QgsLayerType is in the export code that produces the layer csv. This puts "Online" in the "Vector or Raster" column for online layers! That seems confusing. Maybe a separate field for "On disk" that is true/false would be a better indicator. Online assets are still either vectors or rasters!

This PR takes one step in the right direction by cleaning up OBE references to gdal_remote layers and removes "Online" from the list of QgsLayerTypes. Instead, add in the unique "Online" behavior where it's used - in the export code!

Checklist

If an item on this list is done or not needed, check it with [x] or click the checkbox.

MattF-NSIDC commented 1 year ago

I don't think I'll get to this til tomorrow!

MattF-NSIDC commented 1 year ago

This puts "Online" in the "Vector or Raster" column for online layers! That seems confusing. Maybe a separate field for "On disk" that is true/false would be a better indicator. Online assets are still either vectors or rasters!

:100: let's decouple these concepts.