[MDEV-11881] Empty coordinates must be rejected in GeoJSON objects Created: 2017-01-23 Updated: 2017-11-14 Resolved: 2017-11-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrii Nikitin (Inactive) | Assignee: | Alexey Botchkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 10.2.11 |
| Description |
|
These objects are valid in json, but invalid in geojson , so must be handled accordingly. |
| Comments |
| Comment by Andrii Nikitin (Inactive) [ 2017-01-23 ] | ||||||||||||||||||||||
|
According to the spec http://geojson.org/geojson-spec.html empty array is allowed, so this may be bug in st_astext() , because formatting of doesn't look correct On the other hand Point type must be rejected when it is not complete:
And again - behavior is inconsistent with st_geomfromtext(), (which cannot accept empty array) and MySQL 5.7, which throws an error to all these cases, | ||||||||||||||||||||||
| Comment by Andrii Nikitin (Inactive) [ 2017-01-23 ] | ||||||||||||||||||||||
|
Another example of invalid string accepted for linestring:
Problem is both that invalid json is accepted (comma is missing) and that linestring requires at least two (valid) positions (i.e. "points") according to mentioned spec
| ||||||||||||||||||||||
| Comment by Alexey Botchkov [ 2017-11-14 ] | ||||||||||||||||||||||
|
http://lists.askmonty.org/pipermail/commits/2017-November/011653.html |