Skip to content

Commit

Permalink
updates to examples to be a bit more clear (#53)
Browse files Browse the repository at this point in the history
* updates to examples to be a bit more clear

* Update examples.md

Co-authored-by: Matthias Mohr <[email protected]>

* fix for markdown linting

Co-authored-by: Matthias Mohr <[email protected]>
  • Loading branch information
cholmes and m-mohr authored Nov 5, 2020
1 parent 0cf9af5 commit f19b49f
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Request 100 results in `mycollection` from New Zealand:
GET /collections/mycollection/items?bbox=160.6,-55.95,-170,-25.89&limit=100
```

Request all the data in `mycollection` that is in New Zealand from January 1st, 2019:
Request all the data in `mycollection` that is in New Zealand at anytime on January 1st, 2019:

```http
GET /collections/mycollection/items?bbox=160.6,-55.95,-170,-25.89&datetime=2019-01-01T00:00:00Z/2019-01-01T23:59:59ZZ
GET /collections/mycollection/items?bbox=160.6,-55.95,-170,-25.89&datetime=2019-01-01T00:00:00Z/2019-01-01T23:59:59Z
```

Request 10 results from the data in `mycollection` from between January 1st (inclusive) and April 1st, 2019 (exclusive):
Expand All @@ -30,6 +30,19 @@ GET /collections/mycollection/items?datetime=2019-01-01T00:00:00Z/2019-03-31T23:

## STAC API

The STAC API `/search/` endpoint can support the same requests as above, as POST.

Request 100 results in `mycollection` that is in New Zealand at anytime on January 1st, 2019:

```json
{
"collections": ["mycollection"],
"bbox": [160.6,-55.95,-170,-25.89],
"limit": 100,
"datetime": "2019-01-01T00:00:00Z/2019-01-01T23:59:59Z"
}
```

Use the *[Query](extensions/query/README.md)* extension to search for any data falling within a specific geometry
collected between Jan 1st and May 1st, 2019:

Expand All @@ -40,12 +53,12 @@ Request to `POST /search`:
"intersects": {
"type": "Polygon",
"coordinates": [[
[-77.08248138427734, 38.788612962793636], [-77.01896667480469, 38.788612962793636],
[-77.01896667480469, 38.835161408189364], [-77.08248138427734, 38.835161408189364],
[-77.08248138427734, 38.788612962793636]
[-77.0824, 38.7886], [-77.0189, 38.7886],
[-77.0189, 38.8351], [-77.0824, 38.8351],
[-77.0824, 38.7886]
]]
},
"time": "2019-01-01/2019-05-01"
"datetime": "2019-01-01/2019-05-01"
}
```

Expand Down

0 comments on commit f19b49f

Please sign in to comment.