Closed akx closed 8 years ago
geography
-type doesn't support ST_centroid)srid=nnnn
, this SRID is used in input and output, otherwise SRID=4326/WGS84(In the future API may support a rich set of geospatial filters, if someone wants to implement them.)
If request is POSTed as json, it could look like this:
{
"title": "Geometry example",
"service_code": "180",
"description": "LineString as requested",
"first_name": "Test",
"last_name": "Post",
"geometry": {
"type": "LineString",
"coordinates": [
[25.0, 60.18],
[25.01, 60.19],
[25.02, 60.20],
[25.025, 60.21]
]
}
}
Example request using HttPie and JSON payload:
http POST 'http://127.0.0.1:8000/api/georeport/v2/requests.json?extensions=citysdk,media' < request-post-geo.json
Leave off media
to switch from multipart to urlencoded form post type.
If request is multipart/formdata, geometry
should be regular form field filled with valid geojson. Example request using HttPie:
http -f POST 'http://127.0.0.1:8000/api/georeport/v2/requests.json?extensions=citysdk,media' service_code=171 title='Multipart geometry' description="Multipart" email=Email@addre.ss first_name=First last_name=Last phone=Phone geometry='{"type":"LineString","coordinates": [[25.0, 60.18],[25.01, 60.19],[25.02, 60.20],[25.025, 60.21]]}' media@~/picture.jpg
More detailed specification as requested by @akx . Of course, assignee is encouraged to contact the client if specification has obvious stupidities.
Fixed via #63!
Add a geometry extension; to be specified more closely by @aapris.
Issue
'slocation
.37 (or other GIS queries) need not interact with these arbitrary geometries