umap icon indicating copy to clipboard operation
umap copied to clipboard

Uniformize the way we store metadata in the geojson

Open yohanboniface opened this issue 1 year ago • 2 comments
trafficstars

  • map metadata are stored in properties of the top level
  • datalayer metadata are stored in _umap_options of the FeatureCollection level
  • feature metadata are stored in the _umap_options key inside properties at the Feature level

This should be more consistent. We may have a separate key for all (eg. metadata, style, umap) at the same level of properties. But we may also decide that everything goes inside properties, and any key that is recognized by uMap would be used as a metadata (and exposed to user through specific form fields), and any key which is not part of its format would be considered as data, (and exposed to used through the non typed data form). Maybe we should also separate the styling metadata (which may be used by other tools) from behaviour metadata, which are very tied to uMap itself.

cf #316 cf https://github.com/mapbox/simplestyle-spec

cf #1635

yohanboniface avatar Feb 20 '24 08:02 yohanboniface

#1646

yohanboniface avatar Feb 22 '24 11:02 yohanboniface

I share the pain, this is what my Umap overlay processing style currently has:

for path in ['$.properties.*', '$.properties._storage.*', '$._storage.*', '$.properties._storage_options.*', '$._storage_options.*', '$.properties._umap_options.*', '$._umap_options.*']:

https://github.com/hholzgra/ocitysmap/blob/5d41e4c3b31cb8b554fdb0be017e426cf6ef155f/ocitysmap/stylelib/Umap.py#L82

Not sure why _storage_options is also in there, might have been also used in older Umap versions ... I would not have added that for nothing ...

hholzgra avatar Mar 24 '24 06:03 hholzgra