Skip to main content
Solved

How to read Oracle Spatial geometry in between the flow?

  • June 20, 2013
  • 6 replies
  • 91 views

I am able to read a Oracle Spatial geometry using FME "Oracle Spatial Object" reader. However when I am trying to read a SDO_GEOMTERY using SQL_Executor, I am not able to expose the geometry attribute. How do I read a SDO_GEOMTERY in FME in between the flow?

 

 

Regards,

 

Ananda

Best answer by david_r

Hi,

 

 

you can use an SQLExecutor with something like

 

 

select sdo_util.to_wktgeometry(shape) as SHAPE_WKT

 

from myschema.mytable

 

where objectid = @Value(OBJECTID)

 

 

You can then expose SHAPE_WKT and use the GeometryReplacer to convert the text back into a proper geometry object (specify OGC Well-Known Text as 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.

6 replies

david_r
Celebrity
  • Best Answer
  • June 20, 2013
Hi,

 

 

you can use an SQLExecutor with something like

 

 

select sdo_util.to_wktgeometry(shape) as SHAPE_WKT

 

from myschema.mytable

 

where objectid = @Value(OBJECTID)

 

 

You can then expose SHAPE_WKT and use the GeometryReplacer to convert the text back into a proper geometry object (specify OGC Well-Known Text as encoding).

 

 

David

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • June 20, 2013
Hi,

 

 

Optionally you can access the oracle features via a feature reader.

 

 

Itay

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 21, 2013
Yeah, u need to explicitly select the geometry column in ur sql query to get it exposed.

 

Like David said.

syedh2993
Contributor
Forum|alt.badge.img+7
  • Contributor
  • October 30, 2024

I have similar scenario like in this thread.

 

I have a CSV file which has oracle geometry object in below format

 

Example:  MDSYS.SDO_GEOMETRY(3002,null,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(123456.742,234567.714,0,789123.786,5432156.2392,0))

 

It is a Multiline geometry. Using Database Reader, FME automatically recognises the geometry. However, in CSV file it doesn’t.

Would really appreciate if anyone can help with below

  1. which transformer to use so that FME recognises the above geometry ?
  2. is there anyway to extract Lat Long for the above ?

Thanks,

Syed

 


saraatsafe
Safer
Forum|alt.badge.img+12
  • Safer
  • November 6, 2024

Hi @syedh2993

You can try using the Oracle Spatial Object Reader instead, and then using a VertexCreator to create points from your latitude and longitudinal information. I hope this helps point you in the right direction!

 


syedh2993
Contributor
Forum|alt.badge.img+7
  • Contributor
  • November 7, 2024

Hi @syedh2993

You can try using the Oracle Spatial Object Reader instead, and then using a VertexCreator to create points from your latitude and longitudinal information. I hope this helps point you in the right direction!

 

Hi Sara,

Thanks for the response. I am not sure if I can use Oracle Spatial Object Reader in this scenario as my source data is CSV file and not Oracle database.