Question

can not read oracle data - bad geometries

  • 23 May 2018
  • 1 reply
  • 8 views

Badge

Hi,

I have a oracle spatial reader setup to read a number of tables. All the tables can read except one table and the reader stops automatically with a error message in the log - Error - Cannot have NULL value for 'x coordinate'. I tried to filter the bad geometries with a where clause like this - SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT( G3E_GEOMETRY, 0.005, 'TRUE') = 'TRUE' . That did not work either and the same error followed. Surprisingly when I used this sql statement at SQLDeveloper, it results in a set of valid records. I am not sure why FME is not able to read these valid records.

Appreciate if you could help me out with this.


1 reply

Userlevel 4

You can try and debug the contents of the table in question using a SQLCreator (rather than the Reader) set to Oracle non-spatial and something like this:

SELECT MY_ID, SDO_UTIL.TO_WKTGEOMETRY(GEOM) AS WKT_GEOM FROM MY_TABLE;

You can then use the GeometryReplacer on WKT_GEOM (set to OGC Well-Known Text) and inspect whatever comes out the Rejected-port.

Reply