Giter Site home page Giter Site logo

geopython / diving-into-pygeoapi Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 14.0 53.63 MB

pygeoapi is an OGC Reference Implementation supporting numerous OGC API specifications. This workshop will cover publishing geospatial data to the Web using pygeoapi in support of the suite of OGC API standards.

Home Page: https://dive.pygeoapi.io

License: MIT License

CSS 10.97% JavaScript 54.16% HTML 14.66% Scheme 5.05% Python 15.16%
api geospatial ogc pygeoapi rest

diving-into-pygeoapi's Introduction

geopython

Vanity package for geopython projects

pip install geopython
>>> import geopython

diving-into-pygeoapi's People

Contributors

doublebyte1 avatar francbartoli avatar justb4 avatar kalxas avatar krishnaglodha avatar pascallike avatar pvgenuchten avatar tomkralidis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

diving-into-pygeoapi's Issues

Decide on Docker Compose command

Heads up: Docker Compose is now part of the Docker CLI. since Docker Desktop 3.2.1. But worse the command has changed: i.s.o. docker-compose it is docker compose (space i.s.o. hyphen).
I think it appears in Ubuntu 22.04, but not in Ubuntu 20.04 and not in older Docker Desktop for Mac versions. You can try your status by typing:
docker compose version (not --version). You either get a version like v2.2.1 or docker: 'compose' is not a docker command..

So what to do? It is still possible to install docker-compose via pip (v1.29). We tried using alias yesterday but that became messy.

I suggest using docker-compose.

Improve Docker (Compose) example setup and relation to Exercises

This concerns the exercises under https://github.com/geopython/diving-into-pygeoapi/tree/main/workshop/docker

There are some problems with running and I think we should make it more structured, referring to specific exercises.

Also, out of the box, the starting docker-compose.yml docker-compose up does not work (Service does not exist: /data/tiles and think assumes ES).

Think would be beneficial to number the Exercises in the documentation and thus refer in the commented docker compose file. We may even rename the root dir from docker to exercises....

create workshop agenda

Draft schedule/timing (time zone is in CEST):

Move ES to advanced of remove references

We decided to remove ES from the core material (thanx antonio for updating catalogue).

  • Does it still make sense to have a ES exercise in Advanced?
  • Else we can better remove the ES references on the workshop material?

Error while running on m1

Hi. I 'm trying to run setup on m1 mac using
docker run --rm -p 5000:80 geopython/pygeoapi:latest but getting following error

START /entrypoint.sh
Trying to generate openapi.yml
Error Number: 1, Type: Failure, Msg: PROJ: proj_create_from_database: SQLite error on SELECT name, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM projected_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name
Traceback (most recent call last):
  File "/pygeoapi/pygeoapi/provider/ogr.py", line 844, in handler
    raise ProviderGenericError(last_error)
pygeoapi.provider.base.ProviderGenericError: PROJ: proj_create_from_database: SQLite error on SELECT name, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM projected_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name

The above exception was the direct cause of the following exception:


Traceback (most recent call last):
  File "/usr/local/bin/pygeoapi", line 11, in <module>
    load_entry_point('pygeoapi', 'console_scripts', 'pygeoapi')()
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1134, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1059, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1665, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1665, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1401, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 767, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/pygeoapi/pygeoapi/openapi.py", line 1206, in generate
    content = yaml.safe_dump(get_oas(s), default_flow_style=False)
File "/pygeoapi/pygeoapi/openapi.py", line 1159, in get_oas
    return get_oas_30(cfg)
  File "/pygeoapi/pygeoapi/openapi.py", line 489, in get_oas_30
    p = load_plugin('provider', get_provider_by_type(
  File "/pygeoapi/pygeoapi/plugin.py", line 108, in load_plugin
    plugin = class_(plugin_def)
  File "/pygeoapi/pygeoapi/provider/ogr.py", line 160, in __init__
    source.ImportFromEPSG(self.source_srs)
  File "/usr/lib/python3/dist-packages/osgeo/osr.py", line 728, in ImportFromEPSG
    return _osr.SpatialReference_ImportFromEPSG(self, *args)
SystemError: <built-in function SpatialReference_ImportFromEPSG> returned a result with an error set
ERROR: openapi.yml could not be generated ERROR

I do have GDAL installed on machine.

Python-based client exercises: may use Docker container

For Python interaction with the local pygeoapi instance, e.g. OWSLib: use a (Debian) Python Image with host-networking in single line:
docker run -it --rm --network=host --name owslib python:3.10-slim /bin/bash

This gets you into a bash shell with a full Python environment (pip etc) and from which you can interact with the local pygeoapi instance:

root@docker-desktop:/# pip install owslib
root@docker-desktop:/# python
>>> from owslib.ogcapi.features import Features
>>> w = Features('http://localhost:5000')
>>> w
<owslib.ogcapi.features.Features object at 0x7ff493e6f850>
>>> conformance = w.conformance()
>>> conformance

etc
This keeps your system "clean".

DevOPS / GitOPS

Contents

  • Explain why pygeoapi fits well in cloud strategy
  • Some aspects to keep in mind while deploying in cloud
    • Configure outside url/port/path
    • Scaling
    • Configuration overrides via environment variables
    • Monitoring with GeoHealthCheck

Exercise

?

Create a custom domain and auto-publish the workshops docs there

In follow up of #12: need to:

  • auto-publish the docs, like the Geonovum Example and gh-pages
  • in DNS: create a subdomain to host the WS (mk)docs, e.g. short: ws.pygeoapi.io or dive.pygeoapi.io
  • in DNS: do the CNAME DNS trick
  • in GH repo: adapt Settings to host the static doc-site

Update: Actually we are doing a similar setup for pygeoapi.io website: https://github.com/geopython/pygeoapi.io. The 'Geonovum' site was based on that work :-).

Add support for OGC API Features Part 2 - CRS support

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

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 src_epsg and target_epsg from OGR Providers (they are unsupported and obsolete now). src_epsg should be replaced with corresponding storage_crs.
See also https://docs.pygeoapi.io/en/latest/crs.html.

Demo/Exercise various ogc api clients

An inventarisation of existing clients

OGC API Features

OGC API Records

OGC API Tiles

OGC API Coverages

STAC/COG

SPARQL (evaluate if json-ld has been properly configured)

Suggestions for exercises

  • QGIS;
    • query a ogc-api-records catalogue (would be nice to be able to open a map service from a record, status?)
    • add a ogc-api features layer
  • OpenLayers;
    • Add a ogc-api-tiles layer;
    • Add a ogc-api-Features layer;
  • GDAL
    • connect to a ogc api features service (ogrinfo; ogr2ogr)
    • connect to a ogc api coverages service (gdalinfo)

Extend Docker install docs for Linux non-root users

Docker post-install steps in case of permission problems, even when using sudo.

See https://docs.docker.com/engine/install/linux-postinstall/ :

    If you don’t want to preface the docker command with sudo, create a Unix group called docker and add users to it. When the Docker daemon starts, it creates a Unix socket accessible by members of the docker group. On some Linux distributions, the system automatically creates this group when installing Docker Engine using a package manager. In that case, there is no need for you to manually create the group.
    
    To run Docker without root privileges, see [Run the Docker daemon as a non-root user (Rootless mode)](https://docs.docker.com/engine/security/rootless/).
    
    To create the docker group and add your user:
    
    Create the docker group.
    
    
     sudo groupadd docker

    Add your user to the docker group.
          
     sudo usermod -aG docker $USER

create test data bundle

Requirements

  • vector data
    • e.g. GPKG, Shapefiles, GeoJSON
  • raster data
    • GeoTIFF/COG, GRIB2, NetCDF
  • metadata
    • ISO
    • OARec records

Considerations:

  • local data (Florence/Italy) would be of value given FOSS4G 2022

cc @geopython/diving-into-pygeoapi-team

Next Meeting

Our next meeting, will be on the 2nd of August at 12 UTC.

Minor editorial issues tiles exercise/config

@doublebyte1 Went through the exercise, all working, QGIS, Leaflet etc.! Two minor editorials:

  • tiles.md L106: the{tileMatrix}/{tileRow}/{tileCol} by {x}/{x}/{y}. must be the{tileMatrix}/{tileRow}/{tileCol} by {z}/{x}/{y}.
  • docker.config.yml Cycles Collection: setting id_field: accicid worked for me

setup documentation framework

Based on our 2022-05-20 discussion, we have consensus on using MkDocs for the content, which we can use once we have finalized the agenda (#3).

cc @geopython/diving-into-pygeoapi-team

determine workshop environment

Options:

  • Docker Compose
  • OSGeoLive
    • would need recent pygeoapi version
    • depends on release schedule
  • Gitpod
  • Kasm
  • other options?

Considerations

  • will need various backends (ES, PostgreSQL)

cc @geopython/diving-into-pygeoapi-team for comment/recommendation.

Imagery about oaf vs oapif

708EA566-F191-4774-BF1F-89569EBE8F84
Just snapped this in Ardennes belgium, In case we need a slide to explain about the discussion of finding proper abbreviations for ogc api

search engines/schema.org

Contents

  • HTML as a first class citizen in ogc api features enables search engine access to feature level
  • Use search engine tools to evaluate SEO
  • How to disable SEO (robots.txt)
  • Default accept headers, sitemap and canonical url
  • schema.org / json-ld / rich snippets testing tool

Exercise

  • Evaluate your pygeoapi in SEO tools

Error in tile metadata during exercise 4

What version of Python are you using? Whatever is installed on docker image geopython/pygeoapi:latest
What operating system are you using? Windows 11 64 bit
Which version or versions of the software are you using?

  • Docker version 24.0.6, build ed223bc
  • Docker Compose version v2.22.0-desktop.2

How can the we recreate your problem? Imagine that we have never used the Diving into pygeoapi workshop before and have downloaded it for the first time. Exactly what steps do we need to take to reproduce your problem?

C:\Projects\pygeoapi-trial\workshop\exercises> docker run -it --rm -v .\data:/data emotionalcities/tippecanoe tippecanoe --output-to-directory=/data/tiles/ --force --maximum-zoom=16 --drop-densest-as-needed --extend-zooms-if-still-dropping --no-tile-compression /data/cycle-lanes-firenze.geojson
For layer 0, using name "cyclelanesfirenze"
/data/cycle-lanes-firenze.geojson:6: ignoring dimensions beyond two
In JSON object [11.305009255881071,43.752250927369978,58.216000765673471]
In JSON object {"type":"Feature","properties":{"accicid":"acCicId_342","acciccon":"01","acciccon_d":"reale","accic_c":"AcCic-c_1","accicpos":"02","accicpos_d":"su sede stradale","accic_lung":227.77324830329036},"geometry":{"type":"MultiLineString","coordinates":[[[11.305009255881071,43.752250927369978,58.216000765673471],[11.304913042439582,43.751854850642324,58.304001725240354],[11.304897435922136,43.751789349404881,58.354004998991527],[11.304879939854354,43.751717340730373,58.432001301945533],[11.30485693...
1093 features, 89236 bytes of geometry, 62 bytes of separate metadata, 36022 bytes of string pool
  99.9%  16/34824/23890

After restarting pygeoapi, opening http://localhost:5000/collections/Cycle/tiles/WorldCRS84Quad/metadata results in an HTTP 500 Internal server error. Pygeoapi logs the following errors:

pygeoapi  | [2023-11-14T14:09:00Z] {/usr/local/lib/python3.10/dist-packages/flask/app.py:825} ERROR - Exception on /collections/Cycle/tiles/WorldCRS84Quad/metadata [GET]
pygeoapi  | Traceback (most recent call last):
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1455, in wsgi_app
pygeoapi  |     response = self.full_dispatch_request()
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 869, in full_dispatch_request
pygeoapi  |     rv = self.handle_user_exception(e)
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/flask_cors/extension.py", line 176, in wrapped_function
pygeoapi  |     return cors_after_request(app.make_response(f(*args, **kwargs)))
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 867, in full_dispatch_request
pygeoapi  |     rv = self.dispatch_request()
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 852, in dispatch_request
pygeoapi  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
pygeoapi  |   File "/pygeoapi/pygeoapi/flask_app.py", line 298, in get_collection_tiles_metadata
pygeoapi  |     return get_response(api_.get_collection_tiles_metadata(
pygeoapi  |   File "/pygeoapi/pygeoapi/api.py", line 221, in inner
pygeoapi  |     headers, status, content = func(*args, **kwargs)
pygeoapi  |   File "/pygeoapi/pygeoapi/api.py", line 203, in inner
pygeoapi  |     return func(cls, req_out, *args[2:])
pygeoapi  |   File "/pygeoapi/pygeoapi/linked_data.py", line 60, in inner
pygeoapi  |     return func(*args, **kwargs)
pygeoapi  |   File "/pygeoapi/pygeoapi/api.py", line 2970, in get_collection_tiles_metadata
pygeoapi  |     tiles_metadata = p.get_metadata(
pygeoapi  |   File "/pygeoapi/pygeoapi/provider/mvt.py", line 283, in get_metadata
pygeoapi  |     content = MVTTilesJson(**metadata_json_content)
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/pydantic/main.py", line 164, in __init__
pygeoapi  |     __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pygeoapi  | pydantic_core._pydantic_core.ValidationError: 3 validation errors for MVTTilesJson
pygeoapi  | tiles
pygeoapi  |   Field required [type=missing, input_value={'name': '/data/tiles/', ... sede stradale"]}]}]}}'}, input_type=dict]
pygeoapi  |     For further information visit https://errors.pydantic.dev/2.4/v/missing
pygeoapi  | attribution
pygeoapi  |   Field required [type=missing, input_value={'name': '/data/tiles/', ... sede stradale"]}]}]}}'}, input_type=dict]
pygeoapi  |     For further information visit https://errors.pydantic.dev/2.4/v/missing
pygeoapi  | vector_layers
pygeoapi  |   Field required [type=missing, input_value={'name': '/data/tiles/', ... sede stradale"]}]}]}}'}, input_type=dict]
pygeoapi  |     For further information visit https://errors.pydantic.dev/2.4/v/missing
pygeoapi  | [2023-11-14T14:15:02Z] {/usr/local/lib/python3.10/dist-packages/flask/app.py:825} ERROR - Exception on /collections/Cycle/tiles/WorldCRS84Quad/metadata [GET]
pygeoapi  | Traceback (most recent call last):
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1455, in wsgi_app
pygeoapi  |     response = self.full_dispatch_request()
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 869, in full_dispatch_request
pygeoapi  |     rv = self.handle_user_exception(e)
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/flask_cors/extension.py", line 176, in wrapped_function
pygeoapi  |     return cors_after_request(app.make_response(f(*args, **kwargs)))
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 867, in full_dispatch_request
pygeoapi  |     rv = self.dispatch_request()
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 852, in dispatch_request
pygeoapi  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
pygeoapi  |   File "/pygeoapi/pygeoapi/flask_app.py", line 298, in get_collection_tiles_metadata
pygeoapi  |     return get_response(api_.get_collection_tiles_metadata(
pygeoapi  |   File "/pygeoapi/pygeoapi/api.py", line 221, in inner
pygeoapi  |     headers, status, content = func(*args, **kwargs)
pygeoapi  |   File "/pygeoapi/pygeoapi/api.py", line 203, in inner
pygeoapi  |     return func(cls, req_out, *args[2:])
pygeoapi  |   File "/pygeoapi/pygeoapi/linked_data.py", line 60, in inner
pygeoapi  |     return func(*args, **kwargs)
pygeoapi  |   File "/pygeoapi/pygeoapi/api.py", line 2970, in get_collection_tiles_metadata
pygeoapi  |     tiles_metadata = p.get_metadata(
pygeoapi  |   File "/pygeoapi/pygeoapi/provider/mvt.py", line 283, in get_metadata
pygeoapi  |     content = MVTTilesJson(**metadata_json_content)
pygeoapi  |   File "/usr/local/lib/python3.10/dist-packages/pydantic/main.py", line 164, in __init__
pygeoapi  |     __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pygeoapi  | pydantic_core._pydantic_core.ValidationError: 3 validation errors for MVTTilesJson
pygeoapi  | tiles
pygeoapi  |   Field required [type=missing, input_value={'name': '/data/tiles/', ... sede stradale"]}]}]}}'}, input_type=dict]
pygeoapi  |     For further information visit https://errors.pydantic.dev/2.4/v/missing
pygeoapi  | attribution
pygeoapi  |   Field required [type=missing, input_value={'name': '/data/tiles/', ... sede stradale"]}]}]}}'}, input_type=dict]
pygeoapi  |     For further information visit https://errors.pydantic.dev/2.4/v/missing
pygeoapi  | vector_layers
pygeoapi  |   Field required [type=missing, input_value={'name': '/data/tiles/', ... sede stradale"]}]}]}}'}, input_type=dict]
pygeoapi  |     For further information visit https://errors.pydantic.dev/2.4/v/missing

Screenshot

image

pygeoapi and INSPIRE

An overview of ogc-api and INSPIRE to evaluate if it makes sense to include it in the training

A general comment first; INSPIRE has adopted a program of good practices, they are considered as alternative implementation options along side the Technical Guidelines. The MIG is actively developing new good practices itself. But anyone in the community can write a good practice and bring it to the attention of the MIG, which can then adopt it. Adoption is supported if there are a number of known implementations of that good practice.

Another relevant comment is that in case no good practice is available (yet), organisations are able to provide a service according to their liking, in that scenario a explanation would be provided how the service matches the directive requirements.

Discovery service (status planned/experimental)

MIG has started a process of writing a good practice on discovery service based on OGC API Records. Expectation is that the good practice will require iso19139.xml as an output format, although another good practice, on using geo-DCAT-ap as an alternative could even replace that requirement soon. Also relevant is the linkage-simplification good practice which lowers the requirements on providing service metadata iso19119

Download Service

Vector (status adopted)

Last year MIG has adopted a Good Practice on providing download service using OGC API Features. I made a review of using pygeoapi for INSPIRE in the scope of geonovum testbed last year; pygeoapi is quite strong on the multilingual aspect required by INSPIRE.

Important aspect of (mainly) download service is the harmonization to the INSPIRE datamodels. The typical application schema xml formats required are a challenge for pygeoapi, however some new encodings are upcoming. The good practice on geopackage and the good practice on RDF will be relevant.

Grid (status not started)

No initiative has been started yet on a good practice for providing coverage download services using OGC API Coverages

Sensors (status adopted)

A good practice exists on providing download service using Sensorthings API. Sensorthings did not land on pygeoapi yet, but it could be an interesting development. To evaluate if OGC API EDR could also act as an alternative sensor download service.

View service (status not started)

No initiative has been started yet on a good practice for providing view services using OGC API Tiles or OGC API Maps. It is expected though, that an initiative will start.

Codelist repository (status experimental)

An important aspect of the INSPIRE harmonization effort is extending INSPIRE codelists to capture unique values used locally. I'm running some experiments to evaluate if I can use pygeoapi itself as a means to publish a code list. Not having to install a dedicated application would be interesting.

pygeoapi as a WFS proxy


my specifications,

OS: Debian GNU/Linux 10 (buster)
Python 3.7.3
GDAL 2.4.0, released 2018/12/14

******************************error message
Traceback (most recent call last):
File "/home/locale/ogcpygeoapi/pygeoapi/bin/pygeoapi", line 11, in
load_entry_point('pygeoapi==0.14.dev0', 'console_scripts', 'pygeoapi')()
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/click/core.py", line 1134, in call
return self.main(*args, **kwargs)
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/click/core.py", line 1059, in main
rv = self.invoke(ctx)
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/click/core.py", line 1665, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/click/core.py", line 1665, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/click/core.py", line 1401, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/click/core.py", line 767, in invoke
return __callback(*args, **kwargs)
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/pygeoapi-0.14.dev0-py3.7.egg/pygeoapi/openapi.py", line 1206, in generate
content = yaml.safe_dump(get_oas(s), default_flow_style=False)
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/pygeoapi-0.14.dev0-py3.7.egg/pygeoapi/openapi.py", line 1159, in get_oas
return get_oas_30(cfg)
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/pygeoapi-0.14.dev0-py3.7.egg/pygeoapi/openapi.py", line 490, in get_oas_30
collections[k]['providers'], ptype))
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/pygeoapi-0.14.dev0-py3.7.egg/pygeoapi/plugin.py", line 106, in load_plugin
module = importlib.import_module(packagename)
File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/pygeoapi-0.14.dev0-py3.7.egg/pygeoapi/provider/ogr.py", line 51, in
class OGRProvider(BaseProvider):
File "/home/locale/ogcpygeoapi/pygeoapi/lib/python3.7/site-packages/pygeoapi-0.14.dev0-py3.7.egg/pygeoapi/provider/ogr.py", line 76, in OGRProvider
OAMS_TRADITIONAL_GIS_ORDER = osgeo_osr.OAMS_TRADITIONAL_GIS_ORDER
AttributeError: module 'osgeo.osr' has no attribute 'OAMS_TRADITIONAL_GIS_ORDER'

*****(I thought the problem was with the GDAL version and I downloaded the gdal-3.5.3 version)

./configure --with-python --with-proj=/usr/bin/python3.7


i took that error message
...
configure: error: PROJ 6 symbols not found


I also checked 3.4.0,3.4.2 and they are affected too, so I presume this affects any 3.x GDAL version.

Mixing yaml and xml?

Not sure if a bug or just a weird way of configuring things but when I am at the end of the Workshop environment setup (http://127.0.0.1:8000/diving-into-pygeoapi/setup/), there is this suspicious line:

-v $(pwd)/default.config.yml:/pygeoapi/pygeoapi-config.xml which replaces an xml with a yaml file

Which is immediately overrided by -e PYGEOAPI_CONFIG=/pygeoapi/pygeoapi-config.yml (if I understood this right).

The full command is

docker run -p 5000:80 \    -v $(pwd)/data:/pygeoapi/mydata \
    -v $(pwd)/default.config.yml:/pygeoapi/pygeoapi-config.xml \
    -e PYGEOAPI_CONFIG=/pygeoapi/pygeoapi-config.yml \
    geopython/pygeoapi:latest

(also copy/pasting this directly from the browser, at least on Firefox, ignores the first new line which makes the first \ character useless)

Error with downloading default.config.yml

Hi,
I tried downloading default file

curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/Docker/default.config.yml
but this link is broken , we need to change this to curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/docker/default.config.yml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.