Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f7e9268
Added snap_to_network tool, first iteration.
merretbuurman Oct 11, 2023
1c5628e
Data dir and temp dir no longer hardcoded. Data dir read from env var…
merretbuurman Oct 11, 2023
c67453f
Minor: Modified gitignore.
merretbuurman Oct 11, 2023
692ffc9
Cosmetics: Just comments.
merretbuurman Oct 11, 2023
dde594f
Added process to compute a filtered vector file, returning a path to …
merretbuurman Oct 13, 2023
507aa4b
Removed the example data sources, as we are only interested in proces…
merretbuurman Oct 13, 2023
f2e553c
Adapted the example config to add IGB and AquaInfra contact info.
merretbuurman Oct 13, 2023
b1e8c2c
Cosmetics: Corrected environment variable in comments/examples.
merretbuurman Oct 16, 2023
d1b70d9
Fixed bug: Coordinates were returned as strings, not floats.
merretbuurman Oct 16, 2023
704f8bd
Removed this process, will get its own branch.
merretbuurman Oct 16, 2023
cf4ba9a
Improved: Add default data dir, also same data dir as in get_species_…
merretbuurman Oct 16, 2023
d2f82c6
Cosmetics: Comments.
merretbuurman Oct 16, 2023
af5996c
Renamed process file.
merretbuurman Oct 16, 2023
2d5fad6
Improved: Now basin id can be specified in snap_to_network.
merretbuurman Oct 16, 2023
fef9424
Minor: Logging via LOGGER instead of print.
merretbuurman Oct 16, 2023
96d1497
Updated curl example to test snap_to_network (added new basin_id inpu…
merretbuurman Oct 17, 2023
e1a434e
Bugfix: Intermediate file now has random name, to avoid conflict as G…
merretbuurman Oct 18, 2023
477790a
Cosmetics: Added aqua-infra specific installation instructions for sn…
merretbuurman Oct 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,6 @@ pygeoapi/db.sqlite3

# Pycharm project files
.idea

# TRASH
TRASH
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,16 @@
[pygeoapi](https://pygeoapi.io) is a Python server implementation of the [OGC API](https://ogcapi.ogc.org) suite of standards. The project emerged as part of the next generation OGC API efforts in 2018 and provides the capability for organizations to deploy a RESTful OGC API endpoint using OpenAPI, GeoJSON, and HTML. pygeoapi is [open source](https://opensource.org/) and released under an [MIT license](https://github.com/geopython/pygeoapi/blob/master/LICENSE.md).

Please read the docs at [https://docs.pygeoapi.io](https://docs.pygeoapi.io) for more information.


## AquaInfra case

Please add these steps when installing pygeoapi for the AquaInfra case, as they are needed to run the `snap_to_network` process!

* Please install `geojson` in the virtual environment that runs the service (most likely running `cd /home/.../pygeoapi/pygeoapi;
. ../bin/activate; pip install geojson` will do the job).
* Please create a directory for the input data, e.g. `/home/.../work/pygeo/data`
* Into that directory, add a directory `basin_481051` and into that, put the two input rasters `segment_481051.tif` and `accumulation_481051.tif`. The same for any other river basin you want to support (`481051` being the drainage basin id).
* Then, tell pygeoapi where to find the data, by executing: `export PYGEOAPI_DATA_DIR='/home/.../work/pygeo/data'`.

(Merret, 2023-10-18)
241 changes: 17 additions & 224 deletions pygeoapi-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ server:
languages:
# First language is the default language
- en-US
- fr-CA
# cors: true
pretty_print: true
limit: 10
Expand All @@ -55,250 +54,44 @@ server:
# ogc_schemas_location: /opt/schemas.opengis.net

logging:
level: ERROR
level: DEBUG
#logfile: /tmp/pygeoapi.log

metadata:
identification:
title:
en: pygeoapi default instance
fr: instance par défaut de pygeoapi
en: AquaInfra processing services
description:
en: pygeoapi provides an API to geospatial data
fr: pygeoapi fournit une API aux données géospatiales
en: An OGC conformant API to AquaInfra processing services
keywords:
en:
- geospatial
- data
- api
fr:
- géospatiale
- données
- api
keywords_type: theme
terms_of_service: https://creativecommons.org/licenses/by/4.0/
url: https://example.org
license:
name: CC-BY 4.0 license
name: CC-BY 4.0 license (TODO check)
url: https://creativecommons.org/licenses/by/4.0/
provider:
name: Organization Name
url: https://pygeoapi.io
name: Leibniz Institute for Freshwater Ecology and Inland Fisheries (FVB-IGB), Berlin
url: https://igb-berlin.de
contact:
name: Lastname, Firstname
position: Position Title
address: Mailing Address
city: City
stateorprovince: Administrative Area
postalcode: Zip or Postal Code
country: Country
phone: +xx-xxx-xxx-xxxx
fax: +xx-xxx-xxx-xxxx
email: [email protected]
url: Contact URL
hours: Mo-Fr 08:00-17:00
instructions: During hours of service. Off on weekends.
name: Buurman, Merret
position: Scientific Staff
address: Müggelseedamm 310
city: Berlin
stateorprovince: Berlin
postalcode: 12587
country: Germany
email: [email protected]
url: https://glowabio.org/
role: pointOfContact

resources:
obs:
type: collection
title: Observations
description: My cool observations
keywords:
- observations
- monitoring
linked-data:
context:
- datetime: https://schema.org/DateTime
- vocab: https://example.com/vocab#
stn_id: "vocab:stn_id"
value: "vocab:value"
links:
- type: text/csv
rel: canonical
title: data
href: https://github.com/mapserver/mapserver/blob/branch-7-0/msautotest/wxs/data/obs.csv
hreflang: en-US
- type: text/csv
rel: alternate
title: data
href: https://raw.githubusercontent.com/mapserver/mapserver/branch-7-0/msautotest/wxs/data/obs.csv
hreflang: en-US
extents:
spatial:
bbox: [-180,-90,180,90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: 2000-10-30T18:24:39Z
end: 2007-10-30T08:57:29Z
providers:
- type: feature
name: CSV
data: tests/data/obs.csv
id_field: id
geometry:
x_field: long
y_field: lat

lakes:
type: collection
title:
en: Large Lakes
fr: Grands Lacs
description:
en: lakes of the world, public domain
fr: lacs du monde, domaine public
keywords:
en:
- lakes
- water bodies
fr:
- lacs
- plans d'eau
links:
- type: text/html
rel: canonical
title: information
href: http://www.naturalearthdata.com/
hreflang: en-US
extents:
spatial:
bbox: [-180,-90,180,90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
temporal:
begin: 2011-11-11T11:11:11Z
end: null # or empty (either means open ended)
providers:
- type: feature
name: GeoJSON
data: tests/data/ne_110m_lakes.geojson
id_field: id
title_field: name

mapserver_world_map:
type: collection
title: MapServer demo WMS world map
description: MapServer demo WMS world map
keywords:
- MapServer
- world map
links:
- type: text/html
rel: canonical
title: information
href: https://demo.mapserver.org
hreflang: en-US
extents:
spatial:
bbox: [-180,-90,180,90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: map
name: WMSFacade
data: https://demo.mapserver.org/cgi-bin/msautotest
options:
layer: world_latlong
style: default
format:
name: png
mimetype: image/png

gdps-temperature:
type: collection
title: Global Deterministic Prediction System sample
description: Global Deterministic Prediction System sample
keywords:
- gdps
- global
extents:
spatial:
bbox: [-180,-90,180,90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
links:
- type: text/html
rel: canonical
title: information
href: https://eccc-msc.github.io/open-data/msc-data/nwp_gdps/readme_gdps_en
hreflang: en-CA
providers:
- type: coverage
name: rasterio
data: tests/data/CMC_glb_TMP_TGL_2_latlon.15x.15_2020081000_P000.grib2
options:
DATA_ENCODING: COMPLEX_PACKING
format:
name: GRIB
mimetype: application/x-grib2

test-data:
type: stac-collection
title: pygeoapi test data
description: pygeoapi test data
keywords:
- poi
- portugal
links:
- type: text/html
rel: canonical
title: information
href: https://github.com/geopython/pygeoapi/tree/master/tests/data
hreflang: en-US
extents:
spatial:
bbox: [-180,-90,180,90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: stac
name: FileSystem
data: tests/data
file_types:
- .gpkg
- .sqlite
- .csv
- .grib2
- .tif
- .shp

canada-metadata:
type: collection
title:
en: Open Canada sample data
fr: Exemple de donn\u00e9es Canada Ouvert
description:
en: Sample metadata records from open.canada.ca
fr: Exemples d'enregistrements de m\u00e9tadonn\u00e9es sur ouvert.canada.ca
keywords:
en:
- canada
- open data
fr:
- canada
- donn\u00e9es ouvertes
links:
- type: text/html
rel: canonical
title: information
href: https://open.canada.ca/en/open-data
hreflang: en-CA
- type: text/html
rel: alternate
title: informations
href: https://ouvert.canada.ca/fr/donnees-ouvertes
hreflang: fr-CA
extents:
spatial:
bbox: [-180,-90,180,90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: record
name: TinyDBCatalogue
data: tests/data/open.canada.ca/sample-records.tinydb
id_field: externalId
time_field: recordCreated
title_field: title

hello-world:
snap-to-network:
type: process
processor:
name: HelloWorld
name: SnapToNetwork
Loading