Skip to main content
Solved

How to read Oracle Spatial geometry in between the flow?


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
View original
Did this help you find an answer to your question?

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
Contributor
Forum|alt.badge.img+17
  • Contributor
  • 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+5
  • 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+8
  • 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+5
  • Contributor
  • November 7, 2024
saraatsafe wrote:

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.


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