Skip to content

Instantly share code, notes, and snippets.

Last active November 18, 2015 21:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sh0rtwave/29773181164ef748cc64 to your computer and use it in GitHub Desktop.
Save sh0rtwave/29773181164ef748cc64 to your computer and use it in GitHub Desktop.
EPIC Daily 'Blue Marble' API for
# EPIC Daily “Blue Marble” API
The API URL is:
This gets you a list of the latest day’s images & metadata.
The second form’s optional parameters allow you to focus in to geographical regions that were in view (technically, longitudinal bounding points) on a given date.
For instance: Using North America’s boundaries of east = -53.034, and west = -170.859 and choosing August 24, 2015, the URL would look like this:
The date parameter is unpadded(e.g. 2015-9-1, vs. 2015-09-01 for September 1, 2015), and optional. Leaving the date off will default to the latest image set.
Leaving out the coordinates gets you every image for whatever date is returned.
Adding either longitudinal parameter returns all images for the given date, for which the supplied longitude is in view of the camera.
* * *
## Getting the data -
### Fetching from PHP:
$data_url = ''; // modify the URL as needed for filtering, unmodified gets you the latest
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $data_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$imageDataArray = json_decode(curl_exec($ch));
### Fetching from jQuery:
success : function(iDataArr, stat, xhr) {
// do something with the list
## JSON data reference
### ImageData object:
"image": "epic_1b_20150826231708_00", // image name sans extension.
"caption": "About an image", // Will contain a caption
"coords": “{}", // Contains a JSON string representing a Coordinates object.
"date": "2015-08-26 23:17:08" // The date the capture sequence for the data was initiated
ImageData notes:
For the image field to be useful, it has to be added to a URL. Image URLs differ depending upon purpose.
Given an image name of “epic_1b_20150901205648_00” (taken Sept 1, 2015, with the camera aimed at 3 storms in the pacific (my favorite)), we have URLs as follows:
For compressed JPG thumbnails, the URL would be:
For full-size, compressed JPG previews, the URL would be:
For full-size original PNG images with full metadata in the comments, the URL would be:
### Coordinates object
"centroid_coordinates": { // Geographical coordinates that the satellite is looking at
"lat": 4.076132,
"lon": -169.648562
"dscovr_j2000_position": { // Position of the satellite in space
"x": -1439710.750000,
"y": 659227.437500,
"z": 113316.414062
"lunar_j2000_position": { // Position of the moon in space
"x": 153199.062500,
"y": -319797.531250,
"z": -104905.093750
"sun_j2000_position": { // Position of the sun in space
"x": -134918656.000000,
"y": 62555808.000000,
"z": 27119770.000000
"attitude_quaternions": { // Satellite attitude
"q0": 0.976360,
"q1": -0.212080,
"q2": -0.039540,
"q3": 0.013750
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment