Documentation

Posting an occurrence set from a Shapefile

Detailed documentation about this service is available on the Lifemapper web services WADL document.

To post an occurrence set from a Shapefile, you will need to send an HTTP POST request to the proper URL and include the zipped shapefile as the message body of the request.

Lets first start with determining the correct URL that the post request should be sent to. You will need to know which Lifemapper user should own the new occurrence set and the display name you would like to use. For this example, we will use the public anonymous user, "anon". If you have a Lifemapper user and are logged in, you can use your user id instead and only you will be able to see your occurrence set. We will also use "example" for the display name for this occurrence set. The resulting url is:

/services/sdm/occurrences/xml?pointsType=shapefile&displayName=example

Please note that the "pointsType" url parameter indicates data is coming in as a Shapefile. This is required so that it can be processed.

The message body should contain all of the required files (.shp, .shx, .dbf) zipped into one.

Now after the above message is posted the response from the service will be something like:

The HTTP response code should be 201. If it is 400 check your request. If it is anything else, contact us at: lifemapper [at] ku [dot] edu for help.

When you read the response, note that the element in: lm:response/lm:urls/lm:url will contain a url pointing to your new occurrence set. Keep note of the occurrence set id which is the number listed at the end of the url. In this case, the occurrence set id is 3740259.