Skip to main content
Solved

FeatureReader with Oracle multiple geometry

  • April 22, 2013
  • 3 replies
  • 29 views

raphael
Participant
Forum|alt.badge.img
Hello,

 

 

I use one featureReader to load Oracle spatial data on my workspace.

 

How can i choose my geometry like the oracle spatial reader ?

 

By defaut fme read the first geometry field.

 

 

Thank you

Best answer by david_r

Hi,

 

 

I had a look but I cannot see that it is possible. Hopefully somebody else can prove me wrong :-)

 

 

Alternatively, you could use an SQLExecutor, where you can specify the column names, and transfer the geomtries as WKB using the Oracle spatial function To_WKBGeometry(), e.g.

 

 

SELECT   OBJECTID,   NAME,   SDO_UTIL.TO_WKBGEOMETRY(GEOM3) AS GEOM3 FROM   MYSCHEMA.MYTABLE

 

For this example, you should expose the attributes OBJECTID, NAME and GEOM3 in the SQLExecutor. After the SQLExecutor, insert a GeometryReplacer with OGC Well Known Binary as the geometry encoding.

 

 

David

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • 8392 replies
  • Best Answer
  • April 22, 2013
Hi,

 

 

I had a look but I cannot see that it is possible. Hopefully somebody else can prove me wrong :-)

 

 

Alternatively, you could use an SQLExecutor, where you can specify the column names, and transfer the geomtries as WKB using the Oracle spatial function To_WKBGeometry(), e.g.

 

 

SELECT   OBJECTID,   NAME,   SDO_UTIL.TO_WKBGEOMETRY(GEOM3) AS GEOM3 FROM   MYSCHEMA.MYTABLE

 

For this example, you should expose the attributes OBJECTID, NAME and GEOM3 in the SQLExecutor. After the SQLExecutor, insert a GeometryReplacer with OGC Well Known Binary as the geometry encoding.

 

 

David

 

 


knigge
Contributor
Forum|alt.badge.img+4
  • Contributor
  • 25 replies
  • November 19, 2021

Hey there ...

Just the question: is there still no option to chose between different spatial columns with the FeatureReader? Unfortunately I got a table with 2D and 3D information, so the "Handle Multiple Spatial Columns" option doesn't work with the following error code: "ORACLE Reader: 'Handle Multiple Spatial Columns' requires that all spatial columns have the same coordinate system"


mmccart
Enthusiast
Forum|alt.badge.img+27
  • Enthusiast
  • 81 replies
  • November 19, 2021

@raphael​ / @david_r​ 

We've used SQL SELECT statements to validate SDO geometry but it has been a while. Maybe these might point you in the right direction? You may need to confirm/double-check the GTYPE codes for your system.

 

Linear Geometry

SELECT * FROM SCHEMA.TABLENAME LINETABLE WHERE SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT (geometry, 0.005) = 'TRUE' AND GEOMETRY IS NOT NULL AND (LINETABLE.GEOMETRY.SDO_GTYPE = 2002 OR LINETABLE.GEOMETRY.SDO_GTYPE = 2006)

 

Polygon Geometry

SELECT * FROM SCHEMA.TABLENAME POLYGONTABLE WHERE SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT (geometry, 0.005) = 'TRUE' AND GEOMETRY IS NOT NULL AND (POLYGONTABLE.GEOMETRY.SDO_GTYPE = 2003 OR POLYGONTABLE.GEOMETRY.SDO_GTYPE = 2007)

 

Point Geometry

SELECT * FROM SCHEMA.TABLENAME POINTTABLEWHERE SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT (geometry, 0.005) = 'TRUE' AND GEOMETRY IS NOT NULL AND POINTTABLE.GEOMETRY.SDO_GTYPE = 2001