Question

ORACLE_SPATIAL : Error - Cannot have NULL value for 'z coordinate'

  • 11 March 2019
  • 5 replies
  • 15 views

Hi,

I want to read with FME the data from a database oracle.

I can connect FME to the database but I am not able to read the linear objects. I use the ORACLE_SPATIAL reader. I have the following message : “Error - Cannot have NULL value for 'z coordinate'” Do I have to parametrize FME to be able to read the null value of Z ?

Find attached the text.log oracle_spatial.zip

Thanks,


5 replies

Userlevel 2
Badge +12

Looking at the Text file, I am not sure it is a reader Error.

Have you tried replacing the Null Z values by a 0, using the 3DForcer transformer with these settings?

Hope that helps.

Badge +8

Hi @elenahiguera, It is a known issue with FME Desktop and as per Oracle documentation Z values should be not NULL, but it appears that it's possible to create such table. We are trying to address on our side but currently, there seems to be no workaround. You have to correct the data in Oracle only using SQL 

SDO_CS.MAKE_2D()

This function should work, it is possible that you might have to re-generate your spatial indexes. 

Looking at the Text file, I am not sure it is a reader Error.

Have you tried replacing the Null Z values by a 0, using the 3DForcer transformer with these settings?

Hope that helps.

Hi Erik, Thanks for your answer.

I have tried with the transformer "3DForcer PArametres" and the transformer "NullAttributeMApper" but i have the same : " Error - Cannot have NULL value for 'z coordinate'".

I don't know if it is possible setting FME in a way to read values even there are null.

 

Hi @elenahiguera, It is a known issue with FME Desktop and as per Oracle documentation Z values should be not NULL, but it appears that it's possible to create such table. We are trying to address on our side but currently, there seems to be no workaround. You have to correct the data in Oracle only using SQL 

SDO_CS.MAKE_2D()

This function should work, it is possible that you might have to re-generate your spatial indexes. 

Hi rahulsharma, thanks for your ansewer.

We have the line in 3D, but sometimes we don't have the z value. It's for that reason than we can not converts a three-dimensional geometry into a two-dimensional geometry. We want to keep the z values. Do you thinks there is a way to keep the z value we already have and to read as well the z value null  ? 

 

Badge +2

I had the same issue as mentionned and found a workaround :

 

1/ Use a SQLExecutor - Oracle non spatial with this query :

SELECT SDO_UTIL.TO_GML311GEOMETRY(t.GEOMETRY) AS Gml311Geometry 

FROM YOUR_TABLE t

 

2/ Add a GeometryReplacer with "Geometry Encoding" = GML and "Geometry Source" = "GML311GEOMETRY"

 

3/ Modify the geometry if necessary with 2DForcer, CoordinatesExtractor, etc.

 

4/ Update the geometry with a Oracle Spatial Writer set to "Update"

 

Hope it will help someone :)

Reply