Skip to content

Multipolygon Support? #977

Closed
Closed
@Dherlou

Description

@Dherlou

Hey there,

we are using this API to save/retrieve geo data, especially multipolygons.

I noticed that the API fails when working with multipolygons:

  • GETing results in a blank 200 response
  • POSTing/PUTting results in an sql error SQLSTATE[22003]: Numeric value out of range: 1416 Cannot get geometry object from data you send to the GEOMETRY field

Upon further debugging I found out that the multipolygon field is not detected as a geometric field, hence the value is treated as a typical scalar value, doesn't undergo the WKT-parsing and then fails the syntax check upon inserting.

When I add 'multipolygon' => 'geometry' to the $toJdbc array

private $toJdbc = [
, it seems to work fine (at least from my POV - we are using MariaDB).

Almost all database types (MySQL/MariaDB, PostgreSQL and SQL Server), probably except SQLite (or at least I couldn't find reliable information) seem to support it and the type support for multipolygons seems to be already implemented in

"MultiPolygon",
and
return '^(POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON)\s*\(.*$';
.

Is there a specific reason why the multipolygon type is 'deactivated'? Are there any concerns in enabling it (at least in our installation)?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions