Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
werrolf committed Jun 14, 2022
2 parents 19cda59 + ec1145d commit 36b88d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ RepositoryRegistry and inject the appropriate factory plus DataStore / FeatureTy
DataStoreService and FeatureTypeService classes are and will remain incompatible with
Symfony 4.

## 0.1.29
* Re-add support for explicitly preconfiguring source table srid on FeatureType; only used if detection fails (e.g. views using geometry expressions)

## 0.1.28
* Fix missing detection for native double precision columns when picking default for non-nullable numeric column (see [Mapbender #1396](https://github.com/mapbender/mapbender/issues/1396))
* Fix explicitly entered "0" not saving to nullable numeric columns
Expand Down
5 changes: 5 additions & 0 deletions Component/FeatureType.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ public function itemFromArray(array $values)
public function getSrid()
{
$this->srid = $this->srid ?: $this->getTableMetaData()->getColumn($this->geomField)->getSrid() ?: $this->configuredSrid;
if (!$this->srid) {
# Throw a decently helpful exception now instead of throwing a
# hard to parse one ("Invalid sridTo 0") later.
throw new \RuntimeException("SRID detection failure on {$this->tableName}.{$this->geomField}; must supply an 'srid' value in your featuretype configuration");
}
return $this->srid;
}

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ DataStore configuration supports the following values:
| fields | list of strings | names of columns to load into DataItem / Feature objects | null (=auto-detect columns) |
| filter | string | valid SQL where clause to build into all `search` invocations | null |
| geomField (FeatureType only) | string | name of the geometry column | "geom" |
| srid (FeatureType only) | integer or null | Source srid of `geomField`; used only if detection fails (certain views) | null |

NOTE: you should _not_ attempt placing spatial data into the "default" database containing
your Doctrine entities. You _will_ encounter errors running Doctrine schema updates.
Expand Down

0 comments on commit 36b88d4

Please sign in to comment.