| Bug #88031 | ST_GeomFromGeoJSON allows out-of-range coordinates | ||
|---|---|---|---|
| Submitted: | 9 Oct 2017 14:08 | Modified: | 16 Oct 2017 13:18 |
| Reporter: | Norvald Ryeng | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: GIS | Severity: | S3 (Non-critical) |
| Version: | 8.0.4 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[16 Oct 2017 13:18]
Paul DuBois
Posted by developer: Fixed in 8.0.4, 9.0.0. ST_GeomFromGeoJSON() now returns an error for data in a geographic spatial reference system for which the coordinates are outside the legal range of values. It also now fails with an ER_INVALID_GEOJSON_CRS_NOT_TOP_LEVEL error if a "crs" member that specifies an SRID different from the top-level object SRID is found at a lower level of the GeoJSON document.

Description: ST_GeomFromGeoJSON allows out-of-range longitude and latitude values. They should be rejected with ER_LONGITUDE_OUT_OF_RANGE and ER_LATITUDE_OUT_OF_RANGE. How to repeat: SELECT ST_AsText(ST_GeomFromGeoJSON('{"type": "Point", "coordinates": [-190.1, 120.22]}')); Suggested fix: Raise errors.