-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set title to “All items” for the rel=”items” endpoint in catalogs i…
…nstead of repeating the parent title * Add a “created” column in catalog_feature table to order feature catalog by last inserted, first displayed * The PHP antimeridian computation to split polygon that replaced the SQL code incorrectly split polygons that span more than 180 degrees in longitude. This does not work for global product. Hence, the hypothesis for split/no split is no more based on longitude length asumption but on the order of westernmost vs easternmost coordinates with the asumption that the first coordinates in the GeoJSON is always the westernmost coordinate (follows GeoJSON convention) * Title and description of collection are now duplicated within the catalog table so a search in rocket correctly displayed it
- Loading branch information
Showing
8 changed files
with
198 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/command/with-contenv php | ||
|
||
<?php | ||
|
||
require_once("/app/resto/core/RestoConstants.php"); | ||
require_once("/app/resto/core/RestoDatabaseDriver.php"); | ||
require_once("/app/resto/core/utils/RestoLogUtil.php"); | ||
require_once("/app/resto/core/utils/Antimeridian.php"); | ||
require_once("/app/resto/core/dbfunctions/UsersFunctions.php"); | ||
|
||
/* | ||
* Read configuration from file... | ||
*/ | ||
$configFile = '/etc/resto/config.php'; | ||
if ( !file_exists($configFile)) { | ||
exit(1); | ||
} | ||
$config = include($configFile); | ||
$dbDriver = new RestoDatabaseDriver($config['database'] ?? null); | ||
$queries = []; | ||
|
||
$antimeridian = new AntiMeridian(); | ||
|
||
$targetSchema = $dbDriver->targetSchema; | ||
|
||
try { | ||
$dbDriver->query('ALTER TABLE ' . $targetSchema . '.catalog_feature ADD COLUMN IF NOT EXISTS created TIMESTAMP DEFAULT now()'); | ||
} catch(Exception $e){ | ||
RestoLogUtil::httpError(500, $e->getMessage()); | ||
} | ||
echo "Looks good\n"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.