Skip to main content
Question

Oracle Spatial to SHAPE

  • February 12, 2015
  • 6 replies
  • 13 views

Hello,

 

 

I want to create a SHAPE or KML from Oracle spatial table. I can do that by using FEATUREREADER (FME Desktop 2014). But I need table name to be passed as parameter, as every time I have diff table, to workbench. Since we can't pass table name to FEATUREREADER. How can I create SHAPE from oracle spatial table.

 

Cheers,

 

John

6 replies

fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • February 12, 2015
Hi,

 

 

Try file > new> generate workspace?

  • Author
  • February 12, 2015
Yes I can do that but how can use table name in parameter to create shapefile?

fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • February 12, 2015
This is a good place to start:

 

http://fmepedia.safe.com/articles/How_To/Pass-a-List-of-Tables-or-Layers-to-an-FME-Reader-using-Python-Scripted-Parameters

 

and this can also be helpful:

 

http://fme-memorandum-takashi.blogspot.nl/

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 12, 2015
If you need a triggered SQL reader, i assume that is why you used the featurereader?

 

Or maybe it is due to some spatial selection you used FeatureReader?

 

 

It depends on how you choose wich tabel to read.

 

Is it a user choice?

 

Then You can create a user parameter for user to choose table. You can link this user parameter to the "Feature Types To Read" parameter wich you can find inthe navigator panel under Transformers-->FeatureReader.

 

This same parameter can be used to set a fanout on your shapewriter. You must use the fanout in the navigator for it to work. Adn also you must put the parametervalue into a attribute, because fanout can only link to attributes.

 

 

See pics.

 

 

 

Zoom in and see the user parameter called "Tabel origin".

 

See it is linked to "Feature Types To Read" in the FeatureReader.

 

And the shapeFile has its fanout set to the attribute that holds the tablename.

 

 

Also see this pic.

 

 

The FeatureReader must be set up and you are obligated to choose a table. But this gets overriden by the tabel linked in FeatureReader (navigatorpanel).

 

In my example FeatureReader is set up to read adresses, but as my user attribute  is set to Neighoubrhoods (Buurten in Dutch), it actually reads the neighbourhoodnames and not adresses.

 

 

 

 

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 13, 2015
Hi,

 

After i   saved the file the feature reader shows the parametername in the Transformer. In this case "$TabelOrigin".

 

Appearently you only need to set the fan out on the featuretype on the writer.

 

Here is a pic.

 

 

 

 

In the previous pic u can see it showed the parametervalue, the chosen table , this was prior to saving it. (I have no idea if this is intended behaviour.)

  • Author
  • February 17, 2015
Thanks Gio, This is exactly what I was looking for. That's very helpful.

 

Cheers

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