Develop an API to query coordinates on Cartodb mapping software and identify polygon

  • Posted:
  • Proposals: 3
  • Remote
  • #689196
  • Awarded
Issam Z.
have already sent a proposal.
  • 0

Description

Experience Level: Intermediate
General information for the business: We have data on schools which a company wishes to query
Description of requirements/functionality: We use a hosted mapping software called CartoDB to host geographic information (GIS Data) containing map boundaries for schools. Each set of coordinates in the UK has up to 4 schools associated with it (1. a primary school, 2. a secondary school, 3. a Roman Catholic Primary school and 4. a roman catholic Secondary school).

*** Example of the information
The school boundaries are stored as polygons in Cartodb. Here is a demo of how the information is accessible:
http://rezzio.cartodb.com/viz/0e6179b0-b453-11e4-8b7c-0e853d047bba/embed_map

NOTE: This visualisation has ALL 4 layers on it (you can toggle the layers on and off at the top right). If necessary, 4 separate visualisations can be created, one for each layer, if that is necessary.

If you look particularly at the layer called "sch_nd_primary" and click on any polygon, you will see that some data is shown:
Catchment - This is the School Name
Schid - This is the unique identifier in our system
Rezziourl - this is the ID of the page on our website - eg, http://rezz.io/?p=217

*** Requirements
What I require is an API written which takes in coordinates and returns information in JSON format.

I don't know how to make the query to Cartodb to return what is needed, but I believe it is possible through their API integration.

The information to return is: (open to recommendations too)
The school name
The full URL to the school.
Some generic blurb, like a logo and disclaimer text and URL. (same each time)

I would like the response to have the following information:
1. Confirmation of the the coordinates requested
eg 55.1234,-2.1234

2. the response from EACH layer separately eg:
sch_nd_primary = [School name ABC, http://rezz.io/?p=217]
sch_nd_secondary = [School name DEF, http://rezz.io/?p=218]
sch_rc_primary = [School name GHI, http://rezz.io/?p=219]
sch_rc_secondary = [No Data]

3. The summary error code, eg if at least one layer gave data, then it was a success. If No data on all 4 layesr, then return a different code. If something else went wrong, give a different response.

4. The information which they can display in a way that makes it easy for them to deal with it, eg:
[School name ABC, http://rezz.io/?p=217]
[School name DEF, http://rezz.io/?p=218]
[School name GHI, http://rezz.io/?p=219]

(ie, missing out the layers which have No Data)

5. Generic blurb section (static info).


*** Other Information:
- The system should only pick one school polygon from each layer, just in case there is any overlap of polygons (which is technically possibly), it should just delivery the FIRST school which meets the criteria.

- There will be times when a layer does not have a polygon which covers those coordinates. This is because (a) I don't have that information yet, or (b) because some areas don't have (for example) a Roman Catholic school nearby.

- It will be possible that someone will send coordinates for which we have NO information on any layer. In this case, we should send an error code which indicates that there is No Data

- It must be robust enough that if something unusual happens, we just deliver an API error response and don't crash anyone's systems! The API will be queried around 20k times a day, so it must be robust.

*** Technical information:
Cartodb holds all of the geo-spacial information.
Our website hosted on Amazon.
We use mySQL as a database for the main Rezzio website, Cartodb uses Postgres
I want to keep the API hosting separate from the main website, eg run the API form http://api.rezz.io . We need to log all the requests and responses.
The API will need an authentication system (auth token). No Admin system is needed - I can update a mySQL database manually.



*** Further considerations:
The format of the API request should facilitate further information in the future to be passed and queried.
Firstly, shortly we may wish to return other information about each school - eg address, contact details, coordinates (all of which we have stored in a separate database)
Secondly, we will wish to extend the API away from schools (as we have other data which we could make accessible. Therefore, when a API call is made, we need a mechanism that says "This person is querying School information".
OS requirements: Linux
Extra notes:

New Proposal

Create an account now and send a proposal now to get this job.

Sign up

Clarification Board Ask a Question

    There are no clarification messages.