-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oracle Provider #1329
Oracle Provider #1329
Changes from 38 commits
05da4e5
ae58ab9
04f23b2
76577e5
f8fef75
b20a774
c7d5193
a221fcd
889b35d
e2bfd4a
d5e68b2
f796c84
469f4d8
c26d5b8
b217532
32d5403
3e8d6c5
fe12204
5793c7c
733cf90
706ad8d
ff3421b
6482c57
b7f1b20
95dd9de
8c93808
6aef948
ea30a20
f117fd7
bc6f060
8b3ef13
6a28ed0
efd1960
4135cf6
074bd48
3a04b23
fe29eb3
242f1a8
215a386
4a517b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this file (given we have an example in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the full configuration files are beneficial to keep, alternatively consider creating an oracle docker example. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, there is no benefit. Everything is in the documentation, too. I only forgot to delete this file... |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
# ================================================================= | ||
# | ||
# Authors: Andreas Kosubek <[email protected]> | ||
# | ||
# Copyright (c) 2023 Andreas Kosubek | ||
# | ||
# Permission is hereby granted, free of charge, to any person | ||
# obtaining a copy of this software and associated documentation | ||
# files (the "Software"), to deal in the Software without | ||
# restriction, including without limitation the rights to use, | ||
# copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the | ||
# Software is furnished to do so, subject to the following | ||
# conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be | ||
# included in all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
# OTHER DEALINGS IN THE SOFTWARE. | ||
# | ||
# ================================================================= | ||
|
||
server: | ||
bind: | ||
host: 0.0.0.0 | ||
port: 5000 | ||
url: http://localhost:5000 | ||
mimetype: application/json; charset=UTF-8 | ||
encoding: utf-8 | ||
gzip: false | ||
languages: | ||
# First language is the default language | ||
- en-US | ||
- fr-CA | ||
# cors: true | ||
pretty_print: true | ||
limit: 10 | ||
# templates: | ||
# path: /path/to/Jinja2/templates | ||
# static: /path/to/static/folder # css/js/img | ||
map: | ||
url: https://tile.openstreetmap.org/{z}/{x}/{y}.png | ||
attribution: '© <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>' | ||
# manager: | ||
# name: TinyDB | ||
# connection: /tmp/pygeoapi-process-manager.db | ||
# output_dir: /tmp/ | ||
# ogc_schemas_location: /opt/schemas.opengis.net | ||
|
||
logging: | ||
level: DEBUG | ||
#logfile: /tmp/pygeoapi.log | ||
|
||
metadata: | ||
identification: | ||
title: | ||
en: pygeoapi default instance | ||
fr: instance par défaut de pygeoapi | ||
description: | ||
en: pygeoapi provides an API to geospatial data | ||
fr: pygeoapi fournit une API aux données géospatiales | ||
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 | ||
url: https://creativecommons.org/licenses/by/4.0/ | ||
provider: | ||
name: Organization Name | ||
url: https://pygeoapi.io | ||
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. | ||
role: pointOfContact | ||
|
||
resources: | ||
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 | ||
|
||
orcl-lakes: | ||
type: collection | ||
title: | ||
en: Large Lakes (Oracle) | ||
fr: Grands Lacs (Oracle) | ||
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: OracleDB | ||
data: | ||
host: 127.0.0.1 | ||
port: 1521 | ||
service_name: XEPDB1 | ||
user: geo_test | ||
password: geo_test | ||
id_field: id | ||
table: lakes | ||
geom_field: geometry | ||
title_field: name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this level of information (code blocks, etc.) can go in
pygeoapi/provider/oracle.py
and specify in the doc to consult the plugin itself? We should keep these sections of the docs more user focused.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about to link here to the test class? There is the example class, too.
Something like:
Sometimes it is necessary to use the Oracle client for the connection. In this case init_oracle_client must be set to True.
The provider supports a SQL-Manipulator-Plugin class. With this, the SQL statement could be manipulated. This is
useful e.g. for authorization at row level or manipulation of the explain plan with hints.
An example an more informations about that feature you can find in the test class in tests/test_oracle_provider.py.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1