Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - Database Administration » Database configuration » Database options » Alphabetical list of database options

st_geometry_on_invalid option

Controls the behavior when a geometry fails basic validation (for example, a linestring with one point, a polygon with a ring that is not closed, or a geometry that exceeds the bounds of the spatial reference system).

Allowed values
  • Ignore

    Do nothing when a geometry fails surface validation, and continue with the operation.

  • Error

    Return an error when a geometry fails surface validation, and fail the operation.



  PUBLIC role For current user For other users
Allowed to set permanently? Yes, with SET ANY PUBLIC OPTION Yes Yes, with SET ANY PUBLIC OPTION
Allowed to set temporarily? Yes, with SET ANY PUBLIC OPTION Yes (current connection only) No

If you must load invalid spatial data, you can set the option value to Ignore and then load the invalid data. Once loaded, you can use methods such as ST_IsSimple and ST_IsValue to determine the invalid row, ST_AsText to get the WKT representation of the data. Most other spatial methods give an error if they are passed invalid geometries. Use a text editor to correct the invalid geometry in the WKT, and then update the geometry in the database.