Skip to content

Commit cac3824

Browse files
authored
Merge pull request jjrom#393 from jjrom/develop
Develop
2 parents 24bc276 + 23e60df commit cac3824

26 files changed

+2341
-241
lines changed

README.md

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ Or test the API :
2323
* Get catalogs of products classified by continents - https://tamn.snapplanet.io/catalogs/classifications/geographical/continent?_pretty=1
2424
* Get catalogs of products classified by european countries - https://tamn.snapplanet.io/catalogs/classifications/geographical/continent/continent:Europe:6255148?_pretty=1
2525

26-
# Quick startup
26+
# Installation
27+
28+
## TL;DR
29+
The [INSTALLATION.md](./docs/INSTALLATION.md) file provides additional information on the installation process.
2730

2831
## Deploy the service
2932
To launch a default pre-configured resto instance, just type :
@@ -37,39 +40,11 @@ If you're using docker on Mac with apple Silicon M1 chip, be sure to **turn off
3740

3841
When this option is turned on, every calls to PHP preg_match function (which is used by resto) leads to a segmentation fault within php fpm and an HTTP 502 Bad Gateway error in nginx. Why ? I just don't know !
3942

40-
## Ingest a collection
41-
To ingest a collection using the default **ADMIN_USER_NAME** and **ADMIN_USER_PASSWORD** (see [config.env](config.env)) :
42-
43-
# POST a S2 dummy collection
44-
curl -X POST -d@examples/collections/S2.json "http://admin:admin@localhost:5252/collections"
45-
46-
Then get the collections list :
47-
48-
curl "http://localhost:5252/collections"
49-
50-
### Collection aliases
51-
A collection can contain an array of *aliases* (see [./examples/collections/L8.json](./examples/collections/L8.json#L3-L5) for instance). These aliases are alternate names to the collection id. Thus {collectionId} value in /collections/{collectionId}/* endpoints can use the original collection id or one of its aliases.
52-
53-
Note that id and aliases must be unique in the database. As a consequence, you cannot create a new collection or set an alias to an existing collection that as the same value of one of the aliases of an existing collection.
54-
55-
## Ingest a feature
56-
To ingest a feature using the default **ADMIN_USER_NAME** and **ADMIN_USER_PASSWORD** (see [config.env](config.env)) :
57-
58-
# POST a dummy feature inside the S2 collection
59-
curl -X POST -d@examples/features/S2A_MSIL1C_20190611T160901_N0207_R140_T23XMD_20190611T193040.json "http://admin:admin@localhost:5252/collections/S2/items"
60-
61-
# Update a dummy feature inside the S2 collection
62-
curl -X PUT -d@examples/features/testUpdate.json "http://admin:admin@localhost:5252/collections/S2/items/S2A_MSIL1C_20190611T160901_N0207_R140_T23XMD_20190611T193040"
63-
64-
Then get the feature :
65-
66-
curl "http://localhost:5252/collections/S2/items/S2A_MSIL1C_20190611T160901_N0207_R140_T23XMD_20190611T193040"
67-
6843
## Users, groups and rights
69-
See [./USERS.md](./USERS.md)
44+
See [./USERS.md](./docs/USERS.md)
7045

71-
# TL;DR
72-
The [INSTALLATION.md](INSTALLATION.md) file provides additional information on the installation process.
46+
## Collection and catalogs
47+
See [.COLLECTIONS_AND_CATALOGS.md](./docs/COLLECTIONS_AND_CATALOGS.md)
7348

7449
# References
7550

app/resto/core/RestoCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@
548548
* }
549549
* }
550550
* },
551-
* "stac_version": "0.8.0",
551+
* "stac_version": "1.0.0",
552552
* "stac_extensions": {
553553
* "https://stac-extensions.github.io/eo/v1.0.0/schema.json"
554554
* }

app/resto/core/RestoConstants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class RestoConstants
2020
// [IMPORTANT] Starting resto 7.x, default routes are defined in RestoRouter class
2121

2222
// resto version
23-
const VERSION = '8.0.1';
23+
const VERSION = '8.0.7';
2424

2525
/* ============================================================
2626
* NEVER EVER TOUCH THESE VALUES

app/resto/core/RestoFeatureCollection.php

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
* "type": "FeatureCollection",
8686
* "features":{
8787
* {
88-
* "stac_version": "0.8.0",
88+
* "stac_version": "1.0.0",
8989
* "stac_extensions": {
9090
* "https://stac-extensions.github.io/eo/v1.0.0/schema.json"
9191
* },
@@ -230,7 +230,7 @@
230230
* "type": "FeatureCollection",
231231
* "features":{
232232
* {
233-
* "stac_version": "0.8.0",
233+
* "stac_version": "1.0.0",
234234
* "stac_extensions": {
235235
* "https://stac-extensions.github.io/eo/v1.0.0/schema.json"
236236
* },
@@ -817,17 +817,23 @@ private function getLinks($sorting, $collectionId)
817817
*/
818818
private function getBaseLinks($collectionId)
819819
{
820-
$this->links[] = array(
821-
'rel' => 'self',
822-
'type' => RestoUtil::$contentTypes['geojson'],
823-
'href' => RestoUtil::updateUrl($this->context->getUrl(false), $this->writeRequestParams($this->query))
824-
);
825-
826-
$this->links[] = array(
827-
'rel' => 'search',
828-
'type' => 'application/opensearchdescription+xml',
829-
'href' => $this->context->core['baseUrl'] . '/services/osdd' . (isset($collectionId) ? '/' . $collectionId : '')
830-
);
820+
$this->links = array_merge($this->links, array(
821+
array(
822+
'rel' => 'self',
823+
'type' => RestoUtil::$contentTypes['geojson'],
824+
'href' => RestoUtil::updateUrl($this->context->getUrl(false), $this->writeRequestParams($this->query))
825+
),
826+
array(
827+
'rel' => 'search',
828+
'type' => 'application/opensearchdescription+xml',
829+
'href' => $this->context->core['baseUrl'] . '/services/osdd' . (isset($collectionId) ? '/' . $collectionId : '')
830+
),
831+
array(
832+
'rel' => 'root',
833+
'type' => RestoUtil::$contentTypes['json'],
834+
'href' => $this->context->core['baseUrl']
835+
)
836+
));
831837
}
832838

833839
/**

0 commit comments

Comments
 (0)