Skip to main content

Hello, I've searched all available online sources but none appear to have this issue.

Very simple task: I've added an Oracle Spatial Reader, connected to desired table and now want to extract x/y but I get this error when running.

"Error - Cannot have NULL value for 'z coordinate'"

I've looked at the table in Oracle developer and indeed the Z values are Null.

I'm aware that this table has multiple Spatial columns so I've checked: Handle Multiple Spatial Columns: Yes

I've tried a SELECT statement to run before translation:

SELECT c.GEOM.SDO_POINT.X AS X, c.GEOM.SDO_POINT.Y AS Y,

 

FROM A.ENTITIES c

 

WHERE ACCESS_CODE = 'O'

I've tried to expose the attributes:

 

oracle_sdo_point.x

 

oracle_sdo_point.y

 

oracle_sdo_point.z

Is there a way to force this to 2D rather than looking at the Z values?

Any ideas appreciated.

 

Hi,

When you are query the data for X and Y coordinates then you will get only 2 coordinates. I'm not clear on what is the need to force to 2D... Any how if your data has z coordinate and want to convert to 2D use 2DForcer...

Hope this helps...


Oracle Spatial can store points in two ways.

The first (and best) is to use the SDO_POINT constructor. In that case the SQL you used should work.

But the point can also be created using the SDO_ORDINATES array.

In that case the SQL will look like:

Select c.GEOM.SDO_GEOMETRY.SDO_ORDINATES(1) as X etc.

Hope this helps.


actually, there is a vertex extractor, I believe in the utilities package.


Oracle Spatial can store points in two ways.

The first (and best) is to use the SDO_POINT constructor. In that case the SQL you used should work.

But the point can also be created using the SDO_ORDINATES array.

In that case the SQL will look like:

Select c.GEOM.SDO_GEOMETRY.SDO_ORDINATES(1) as X etc.

Hope this helps.

Thanks for your help Erik but it didn't work.

 

Here's the format of the GEOM column if that helps.

 

MDSYS.SDO_GEOMETRY(3001,8311,MDSYS.SDO_POINT_TYPE(149.49654,-27.84651,NULL),NULL,NULL)

 

 


Reply