geopython / geopython-workshop

The Doing Geospatial in Python Workshop (mainly provided at FOSS4G events)
https://geopython.github.io/geopython-workshop
Other
55 stars 22 forks source link

Add/demo support for CRS in data publishing with pygeoapi #112

Closed justb4 closed 1 year ago

justb4 commented 1 year ago

Now that pygeoapi supports Part 2 - CRS support, it makes sense to upgrade the pygeoapi publishing section for the WS to showcase. Although defaults (WGS84 with lon,lat axis ordering) apply, it would be good to show support, if only to mention.

Basically for each 'feature' provider the crs and storageCRS config params need to be added, for example:

        providers:
            - type: feature
              name: Elasticsearch
              data: http://elasticsearch_cite:9200/canada-hydat-daily-mean-02hc003
              id_field: IDENTIFIER
              time_field: DATE
# NEW
              crs:
                - http://www.opengis.net/def/crs/OGC/1.3/CRS84
                - http://www.opengis.net/def/crs/EPSG/0/4326
                - http://www.opengis.net/def/crs/EPSG/0/3348
              storage_crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84

http://www.opengis.net/def/crs/OGC/1.3/CRS84 basically means WGS84 with lon,lat axis ordering, the default.

Also remove all source_srs and target_srs from OGR Providers (they are unsupported and obsolete now). source_srs should be replaced with corresponding storage_crs. See also https://docs.pygeoapi.io/en/latest/crs.html.

tomkralidis commented 1 year ago

As discussed today, this issue is better put forth in the Diving into pygeoapi workshop.