API Documentation

The AWMC API is an interface that allows you to browse, access, and interact with the AWMC database.

This page presents a description of the API and a tutorial for interacting with it.

 

Basic interaction

You can access a record in the AWMC database by creating a URI in the following format:

http://awmc.unc.edu/api/omnia/x

where x is a specific AWMC ID.

For instance, the urban footprint for Rome is:

http://awmc.unc.edu/api/omnia/168940

Data Choices

You can access a GeoJSON (formated according to OpenLayers specifications) or RDF representation of a record by adding /json or /rdf to the URI. For the urban footprint of rome these URIs would be:

http://awmc.unc.edu/api/omnia/168940/json

and

http://awmc.unc.edu/api/omnia/168940/rdf

 

 

Tutorial

The index page of the API presents a simple interface, where you can search for a particular feature by Title, AWMC ID, Pleiades ID, or Type.

In this example we will search for database entries with “Rome” in the title. The results of the search will now appear after you type Rome into the Title field and press the Search button. These results can be sorted by clicking on the column names.

You will see different controls to interact with your results. On searches that return many records you may see a list on your page before the results are “parsed” into the table.

By default only 10 results will be shown per page; this can be changed on the drop-down on the top. You can also use the search box to further narrow your results; in this case we will search for urban areas. This returns the AWMC created urban footprint for Rome.

If you click on the link under the AWMC ID column, you then go to the specific page for a record in our database. If you do this for Rome, you will see a map along with furhter information about the record. This is a stable URI, so going to http://awmc.unc.edu/api/omnia/168940 will always take you to this particular record.

From here you can view the record in two additional formats: as a GeoJSON object or as a RDF object by clicking on the corresponding buttons. You will notice that the URL changes to http://awmc.unc.edu/api/omnia/168940/json or http://awmc.unc.edu/api/omnia/168940/rdf depending on your choice. These are also stable URIs, so if you want to interact with our database programmatically (for instance, if you want to use a particular feature in OpenLayers) you can simply use the desired URI which will furnish the corresponding data.

 

Share

Leave a reply

You must be logged in to post a comment.