-
Please first instantiate PostgreSQL with PostGIS. (Preferably Docker container of mdillon/postgis)
-
Paste the DB URI in config.json
-
Run models.py It will create ORM based tables in the database
-
Run CRUD.py It will populate the PinMap table with the csv of First Task
-
Run geoJsonParser.py It will populate the FeatureFence with the geojson of the Third Task
-
Run app.py
-
/post_location/ <-- Mind the trailing backslash expected parameters = ['lat','lon','pin','address','city']
-
/get_using_postgres/float:lat/float:lon/int:distance/
-
/get_using_self/float:lat/float:lon/int:distance/
-
/where_is/float:lat/float:lon/
-
-
Response Codes- 500 - Internal Server Error 400 - Error in posted data 404 on GET - Check Parameters ( API won't accept any false URIs ) 200 - OK
GET responses have 3 attributes - {ResponseCode, message, data}
message = Explains Why ResponseCode data = The actual query response
POST responses have 2 attributes - {ResponseCode, message}
message = Explains Why ResponseCode