Skip to content

Commit

Permalink
Sofair first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom committed Sep 28, 2023
0 parents commit 105aae9
Show file tree
Hide file tree
Showing 115 changed files with 423,260 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
config/setup.py
config/__pycache__/
pygeoapi/
config/manager/
config/static/tmp/
config/script/__pycache__/
config/process/__pycache__/
config/process/manager/__pycache__/
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# SOFAIR - Sensor Observations to FAIR data

![SOFAIR logo](https://raw.githubusercontent.com/geosas/sofair/main/docs/images/sofair-logo.png)

The SOFAIR project is an interoperable middleware designed to promote and develop the OGC SensorThings standard. It takes the form of an OGC API-compliant service integrating various functions to simplify, automate and guide the FAIRisation of temporal data. The processes are :
* Creation of a new SensorThings instance,
* Methods for configuring this instance,
* Various functions to automate or simplify the supply of data to the service,
* Connecting this service to Spatial Data Infrastructures (SDI) in terms of metadata and geographic layers,
* Automatic generation of permalinks to viewers for displaying data from this service in cartographic or time-based portals.
*
![OGC Compliant](https://github.com/geosas/sofair/blob/main/docs/images/ogc-logo.png)

## SOFAIR middleware sofair is at the heart of an ecosystem of services and communicates with various external interoperable modules

![SOFAIR logo](https://raw.githubusercontent.com/geosas/sofair/main/docs/images/sofair-service.png)

### [geOrchestra](https://www.georchestra.org/)
Free, modular and interoperable Spatial Data Infrastructure providing Geoserver ans Geonetwork.

### [FROST Server](https://www.iosb.fraunhofer.de/en/projects-and-products/frost-server.html)
Open source implementation of OGC SensorThings API.

### [STEAN](https://www.iosb.fraunhofer.de/en/projects-and-products/frost-server.html)
Another open source implementation of OGC SensorThings API based on NodeJS

### [mviewer](https://mviewer.netlify.app/fr/)
Mapping portal with SensorThings extension.

## SOFAIR provides free, independant and interoperable modules

### [pygeoapi](https:/pygeoapi.io)
Python server implementation of the OGC API suite of standards.

### [Swagger](https:/swagger.io)
Framework for generating documentation for Web APIs, based on an open source implementation of the OpenAPI specification.

### [Bulma](https://bulma.io/)
free, open source framework that provides ready-to-use frontend components that you can easily combine to build responsive web interfaces

## SOFAIR portal
![SOFAIR portal snapshot](https://raw.githubusercontent.com/geosas/sofair/main/docs/images/sofair-viewer.png)
70 changes: 70 additions & 0 deletions config/data/sensorthings-metadata-iso19139.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"layerName": "{{layerName}}",
"layerNameIds" : "{{layerNameIds}}",
"layerType": "postgis",
"schemaName": "sensorthings",
"layerNameDb": "{{layerNameDb}}",
"theGeomName": "geometry",
"dataType": "quanti",
"workspace": "sensorthings",
"storeIds": "sensorthings_store",
"layerTitle": "{{layerTitle}}",
"nativeCrs": 4326,
"metadata" : {
"uuid": "{{uuid}}",
"metadataTitle": "{{metadataTitle}}",
"creationDate": "{{creationDate}}",
"abstract": "{{abstract}}",
"lineage": "Cette couche a été générée automatiquement à partir du service OGC SensorThings {{url_sta}}",
"spatialRepresentationType": "vector",
"spatialResolution": 10000,
"legalUseLimitation": null,
"accessConstraint": null,
"useConstraint": "Usage libre sous réserve des mentions obligatoires sur tout docume nt de diffusion : Source : UMR 1069 SAS INRAE - Institut Agro",
"otherConstraint": "Pas de restriction d’accès public",
"uniqueIdentifier": null,
"licence": "La licence qui s'applique pour la réutilisation de cette carte est la « Licence Ouverte / Open License » Etalab, version 2.0",
"licenceUrl": "https://www.etalab.gouv.fr/wp-content/uploads/2017/04/ETALAB-Licence-Ouverte-v2.0.pdf",
"onlineResources": [
{
"resourceURL": "-",
"resourceProtocol": "OGC:WMS",
"resourceName": "{{layerNameIds}}",
"resourceDescription": "",
"ordre": 1
},
{
"resourceURL": "{{url_sta}}",
"resourceProtocol": "WWW:LINK-1.0-http--link",
"resourceName": "Service SensorThings",
"resourceDescription": "Service OGC SensorTings The resource description",
"ordre": 2
}
],
"author": [
{
"author": "{{author}}",
"affiliation": "INRAE, Institut Agro, SAS, 35042, Rennes, France"
}
],
"inspireTheme": "Installations de suivi environnemental",
"keywords": [
{
"keyword": "données ouvertes",
"keywordtype": "theme"
},
{
"keyword": "série temporelle",
"keywordtype": "theme"
}
],
"resourcePoc": {
"organisationName": "UMR 1069 SAS INRAE - Institut Agro",
"deliveryPoint": "65 rue de Saint-Brieuc",
"city": "Rennes",
"postalCode": "35042",
"country": "France",
"electronicMailAddress": "[email protected]"
}
}
}
33 changes: 33 additions & 0 deletions config/how_to.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#install pygeoapi

python3 -m venv pygeoapi
cd pygeoapi
. bin/activate
git clone https://github.com/geopython/pygeoapi.git
cd pygeoapi
pip3 install -r requirements.txt
python3 setup.py install

#install sofair
########################
which pip
pip install -r requirements.txt


#activate sofair
#############################

rm -R /usr/local/sofair-dev/pygeoapi/lib/python3.7/site-packages/pygeoapi-0.16.dev0-py3.7.egg/pygeoapi/process
rm /usr/local/sofair-dev/pygeoapi/lib/python3.7/site-packages/pygeoapi-0.16.dev0-py3.7.egg/pygeoapi/plugin.py


ln -s /usr/local/sofair-dev/config/plugin.py /usr/local/sofair-dev/pygeoapi/lib/python3.7/site-packages/pygeoapi-0.16.dev0-py3.7.egg/pygeoapi/plugin.py
ln -s /usr/local/sofair-dev/config/process /usr/local/sofair-dev/pygeoapi/lib/python3.7/site-packages/pygeoapi-0.16.dev0-py3.7.egg/pygeoapi/process

mkdir /usr/local/sofair-dev/config/static/tmp

source /usr/local/sofair-dev/pygeoapi/bin/activate
export PYGEOAPI_CONFIG=/usr/local/sofair-dev/config/sofair-config.yml
export PYGEOAPI_OPENAPI=/usr/local/sofair-dev/config/sofair-openapi.yml

pygeoapi openapi generate $PYGEOAPI_CONFIG > $PYGEOAPI_OPENAPI
Loading

0 comments on commit 105aae9

Please sign in to comment.