-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #247 from hotosm/feature/country_fetch_cid
Feature : Fetch Countries by cid
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -17,11 +17,14 @@ | |
# 1100 13th Street NW Suite 800 Washington, D.C. 20005 | ||
# <[email protected]> | ||
"""Page Contains Query logic required for application""" | ||
# Standard library imports | ||
import re | ||
from json import dumps, loads | ||
|
||
# Third party imports | ||
from geomet import wkt | ||
|
||
# Reader imports | ||
from src.config import USE_DUCK_DB_FOR_CUSTOM_EXPORTS | ||
from src.config import logger as logging | ||
from src.validation.models import SupportedFilters, SupportedGeometryFilters | ||
|
@@ -777,6 +780,11 @@ def get_countries_query(q): | |
return query | ||
|
||
|
||
def get_country_cid(cid): | ||
query = f"Select ST_AsGeoJSON(cf.*) FROM countries cf where cid = {cid}" | ||
return query | ||
|
||
|
||
def get_osm_feature_query(osm_id): | ||
select_condition = ( | ||
"osm_id, tableoid::regclass AS osm_type, tags,changeset,timestamp,geom" | ||
|