forked from hans/Nominatim
replace ST_Line_Interpolate_Point with ST_LineInterpolatePoint (DB adaption needed)
Name of function was changed in postgis 2.1 and now prints ugly deprecation warnings. For older versions of postgis, function will be renamed to the new name during the setup of the DB. To update existing databases with postgis < 2.1 run: ALTER FUNCTION st_line_interpolate_point(geometry, double precision) RENAME TO ST_LineInterpolatePoint and then reinstall the SQL functions: ./utils/setup.php --create-functions --enable-diff-updates --create-partition-functions
This commit is contained in:
@@ -132,6 +132,10 @@
|
||||
} else {
|
||||
pgsqlRunScript('CREATE EXTENSION postgis');
|
||||
}
|
||||
if ($fPostgisVersion < 2.1) {
|
||||
// Function was renamed in 2.1 and throws an annoying deprecation warning
|
||||
pgsqlRunScript('ALTER FUNCTION st_line_interpolate_point(geometry, double precision) RENAME TO ST_LineInterpolatePoint');
|
||||
}
|
||||
$sVersionString = $oDB->getOne('select postgis_full_version()');
|
||||
preg_match('#POSTGIS="([0-9]+)[.]([0-9]+)[.]([0-9]+)( r([0-9]+))?"#', $sVersionString, $aMatches);
|
||||
if (CONST_Postgis_Version != $aMatches[1].'.'.$aMatches[2])
|
||||
|
||||
Reference in New Issue
Block a user