Skip to main content
Solved

FeatureReader with Oracle multiple geometry


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

 

 

View original
Did this help you find an answer to your question?

3 replies

david_r
Celebrity
  • 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
  • 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+17
  • Enthusiast
  • 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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings