-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
04eccda
commit 72fee4d
Showing
69 changed files
with
1,724 additions
and
78 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+10 Bytes
(100%)
istsos/plugins/unit_con_post/__pycache__/unitConvPost.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+2.73 KB
istsos/plugins/unit_con_post/__pycache__/unitConversionPo_sql_unit.cpython-36.pyc
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# istSOS3 - Retrievers | ||
|
||
In this folder contains all the actions capable of storing the entities into | ||
a database. |
Empty file.
Binary file added
BIN
+122 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+592 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/categories.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+770 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/featureOfInterest.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+878 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/featureOfInterestList.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+545 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/humans.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+729 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/identification.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+703 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/materials.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+747 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/observableProperties.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+681 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/observations.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+762 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/observedProperties.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+703 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/offerings.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+687 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/provider.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+329 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/retriever.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+719 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/samplingMethods.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+601 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/statsOfferings.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+547 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/unitConversion.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+564 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/unitConversionPint.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+506 Bytes
istsos/plugins/unit_con_post/retrievers/__pycache__/uoms.cpython-36.pyc
Binary file not shown.
Empty file.
Binary file added
BIN
+128 Bytes
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+2.06 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/categories.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+1.45 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/featureOfInterest.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+3.18 KB
...s/plugins/unit_con_post/retrievers/aiopg/__pycache__/featureOfInterestList.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+1.6 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/humans.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+1.19 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/materials.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+1.18 KB
...os/plugins/unit_con_post/retrievers/aiopg/__pycache__/observableProperties.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+14.5 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/observations.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+1.64 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/observedProperties.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+4.28 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/offerings.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+1.17 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/samplingMethods.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+1.22 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/statsOfferings.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+1.18 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/unitConversion.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+1.38 KB
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/unitConversion_Pint.cpython-36.pyc
Binary file not shown.
Binary file added
BIN
+830 Bytes
istsos/plugins/unit_con_post/retrievers/aiopg/__pycache__/uoms.cpython-36.pyc
Binary file not shown.
46 changes: 46 additions & 0 deletions
46
istsos/plugins/unit_con_post/retrievers/aiopg/featureOfInterest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
# istSOS. See https://istsos.org/ | ||
# License: https://github.com/istSOS/istsos3/master/LICENSE.md | ||
# Version: v3.0.0 | ||
|
||
import asyncio | ||
from istsos.actions.retrievers.featureOfInterest import ( | ||
FeatureOfInterest | ||
) | ||
|
||
|
||
class FeatureOfInterest(FeatureOfInterest): | ||
"""Return a single Feature of Interest based on identifier filter | ||
""" | ||
|
||
@asyncio.coroutine | ||
def process(self, request): | ||
"""Load all the featureOfInterest | ||
""" | ||
dbmanager = yield from self.init_connection() | ||
cur = dbmanager.cur | ||
identifier = request.get_filter(self._IDENTIFIER) | ||
|
||
if identifier is not None: | ||
yield from cur.execute(""" | ||
SELECT | ||
row_to_json(t) | ||
FROM ( | ||
SELECT | ||
id, | ||
description, | ||
identifier, | ||
foi_name as name, | ||
foi_type as type, | ||
( | ||
ST_AsGeoJSON(ST_Force2D(geom)) | ||
)::json as shape | ||
FROM | ||
public.fois | ||
WHERE | ||
fois.identifier = %s | ||
) t; | ||
""", (identifier,)) | ||
rec = yield from cur.fetchone() | ||
if rec is not None: | ||
request['featureOfInterest'] = rec[0] |
Oops, something went wrong.