|
|
@@ -84,7 +84,7 @@ class Api_WfsServerBase {
|
|
|
$args['wfs:featureID'] = null;// @from: featureID, featureId (featureid)
|
|
|
$args['primaryKey'] = null;// primaryKey type - @from: featureID
|
|
|
|
|
|
- $lowerArgs = array(); foreach ($rawArgs as $name => $value) $lowerArgs[ strtolower($name) ] = $value;
|
|
|
+ $lowerArgs = array(); foreach ($rawArgs as $name => $value) $lowerArgs[ strtolower($name) ] = trim($value);
|
|
|
|
|
|
$args['xsd:type'] = V::get('typename', '', $lowerArgs);
|
|
|
$exType = explode(':', $args['xsd:type']);
|
|
|
@@ -125,7 +125,12 @@ class Api_WfsServerBase {
|
|
|
|
|
|
$args['bbox'] = V::get('bbox', '', $lowerArgs);
|
|
|
if (!empty($args['bbox'])) {
|
|
|
- if (!preg_match("/^\d+(.\d+)?,\d+(.\d+)?,\d+(.\d+)?,\d+(.\d+)?$/", $args['bbox'], $matches)) throw new Exception("Wrong param BBOX");
|
|
|
+ // BBOX may have EPSG at then end - example: ",EPSG:4326"
|
|
|
+ if (!preg_match("/^\d+(.\d+)?,\d+(.\d+)?,\d+(.\d+)?,\d+(.\d+)?(\,EPSG:\d+)?$/", $args['bbox'], $matches)) throw new Exception("Wrong param BBOX");
|
|
|
+ if (preg_match("/\,EPSG:\d+$/", $args['bbox'], $matches)) {
|
|
|
+ $args['bbox'] = substr($args['bbox'], 0, strlen($args['bbox']) - strlen($matches[0]));
|
|
|
+ }
|
|
|
+ if (!preg_match("/^\d+(.\d+)?,\d+(.\d+)?,\d+(.\d+)?,\d+(.\d+)?$/", $args['bbox'], $matches)) throw new Exception("Illegal BBOX format");
|
|
|
$searchParams['f_the_geom'] = "BBOX:{$args['bbox']}";
|
|
|
}
|
|
|
|