Environmental data retrieval API query parser
Project description
Environmental Data Retrieval Query Parser
The OGC API Environmental Data Retrieval query parser makes it easy to parse and use the API query.
install
pip install edr-query-parser
Usage
Initiate
from edr_query_parser import EDRQueryParser
edr_query = EDRQueryParser('https://somewhere.com/collections/my_collection/position?coords=POINT(57.819 '
'-3.966)&datetime=2019-09-07T15:50-04:00/2019-09-07T15:50-05:00¶meter-name=parameter1,'
'parameter2&f=geoJSON&crs=crs86')
Get the collection name
edr_query.get_collection_name()
returns string of the requested collection
Get the query type
edr_query.get_query_type()
returns string of the query type
Get the requested output format
edr_query.get_format()
returns string of the requested output format
Get the parameter names
edr_query.get_parameter_name()
returns list of requested parameters
Get the datetime
if edr.is_datetime_interval():
edr.get_datetime_from()
edr.get_datetime_to()
else:
edr.get_datetime().timestamp() # e.g. gets the timestamp of the datetime
returns datetime object of the requested datetime
Get the get coords type
edr.get_coords_type()
returns the well-know text coords type
Get the coords coordinates
edr.get_coords_coordinates()
returns the well know text coordinates request
Get the coords dictionary
edr.get_coords()
returns dictionary of the well known text query request
Get the CRS
edr.get_crs()
returns string for the requested CRS
Get instances id
edr.get_instances_id()
returns string of the instances id
Get items id
edr.get_items_id()
returns string of the items id
Get locations id
edr.get_locations_id()
returns string of the locations id
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
edr query parser-0.3.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for edr_query_parser-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b210567b4296ddf10e9d79f7192ac18fcd6cc27d5e866bda53e79b10a3c01548 |
|
MD5 | dda55808ccae479424f2024971f421af |
|
BLAKE2b-256 | 01f4cf09bcc0a3554b710f1a93b9a2f664dfd3947cb05e962b45e045dc2229ad |