Closed kshitijrajsharma closed 2 years ago
After research I found out Hot export binds features based on the geometry also while looking at the common query from operpass turbo they need osm element type sometimes as well i.e. nodes,ways and relations Hence I have decided to support both of the case scenario To support Geometry Type, I have added following geometry type for now :
POINT="POINT"
LINESTRING = "LINESTRING"
POLYGON = "POLYGON"
MULTILINESTRING = "MULTILINESTRING"
MULTIPOLYGON = "MULTIPOLYGON"
User can request what type of geometry feature they want in return and we will be searching for those feature in all the relavant osm elements (nodes , ways , relation ) end user will not know about all those process what he / she will be getting is the features with those geometry . Let's say I have made request I want building polygons then I will be searching all the features with polygon geometry in relation , nodes , ways (wherever possible ) and deliver result back to them just like how hot export works right now Now for the second case scenario that user may want to get features based on the osm element types , I have added them as well as optional
NODES = "nodes"
WAYS_LINE = "ways_line"
WAYS_POLY = "ways_poly"
RELATIONS = "relations"
Like this they can specify osm element type they want and we will be delivering based on their input all the geometries available Acceptance Criteria : Now we have two input fields i.e. osm_elements(nodes,ways_line,ways_poly,relations) , geometry_type(POINT,POLYGON,MULTIPOLYGON,MULTILINESTRING,LINESTRING)
Only one input can be provided between those two fields either we need to pass osm_elements or you need to pass geometry_type , Both can not be passed at same time (since it will make confusion ) One of them is supported at a time
If none of them is supplied or left no value in list It will deliver all the data with all geom type
We cann't pass values rather than our specified enum list cc : @ramyaragupathy
Related Commit for the work : 5ecd7311c88c51c7a7d297efd2c4821a2dcb26cc
Original description updated to capture other fields included in this endpoint.
cc @itskshitiz321
An API endpoint, where the user can extract a certain OSM feature type and geometry type within the input polygon
Endpoint:
/rawdata/current-snapshot/
POST Authenticated through OSM loginSource: Underpass
Sample Request Body:
Acceptance Criteria:
Point, LineString, MultiLineString, Polygon, MultiPolygon
nodes/ways/relations