Skip to main content
Question

How to read multiple features from mxd or gdb and write to gdb using only one reader and one writer?

  • November 24, 2021
  • 9 replies
  • 197 views

Forum|alt.badge.img

I want to read all features in the mxd or gdb and write to gdb. How can I do this with only one reader and one writer

9 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

Use a File GeoDatabase Reader and writer.

 

The mxd does not contain data, only layout and layer style.


Forum|alt.badge.img
  • Author
  • November 24, 2021
nielsgerrits wrote:

Use a File GeoDatabase Reader and writer.

 

The mxd does not contain data, only layout and layer style.

I think I didn't explain myself clearly. If I use File GeoDatabase reader to read 'N' feature classes in GDB then I have to use 'N' File GeoDatabase readers. I couldn't remember how we read all feature classes using one File Geodatabase reader. Similar behaviour is seen when we read features from mxd.


Forum|alt.badge.img
  • Author
  • November 24, 2021

I want to read multiple features or feature classes from GDB or MXD using one reader and then write them into GBD using one writer.


nielsgerrits
VIP
Forum|alt.badge.img+54
shashifile wrote:

I think I didn't explain myself clearly. If I use File GeoDatabase reader to read 'N' feature classes in GDB then I have to use 'N' File GeoDatabase readers. I couldn't remember how we read all feature classes using one File Geodatabase reader. Similar behaviour is seen when we read features from mxd.

Ah, I think you are looking for the Dynamic Workflows Tutorial.


Forum|alt.badge.img
  • Author
  • November 24, 2021
shashifile wrote:

I think I didn't explain myself clearly. If I use File GeoDatabase reader to read 'N' feature classes in GDB then I have to use 'N' File GeoDatabase readers. I couldn't remember how we read all feature classes using one File Geodatabase reader. Similar behaviour is seen when we read features from mxd.

All the examples given in the Tutorial are reading single layer hence using single reader. I want to read multiple layers with single reader. There is no dynamic option in the reader. Generally this can be done using Creator->Feature Reader->Feature writer->GDB Writer. I am not able to setup creator to point it to the data source.


nielsgerrits
VIP
Forum|alt.badge.img+54
shashifile wrote:

I think I didn't explain myself clearly. If I use File GeoDatabase reader to read 'N' feature classes in GDB then I have to use 'N' File GeoDatabase readers. I couldn't remember how we read all feature classes using one File Geodatabase reader. Similar behaviour is seen when we read features from mxd.

In the FeatureReader, under Output Ports, choose Single Output Port.

Connect the <Schema> and <Generic> outputports to one FeatureReader inputport.

In the FeatureWriter, under General, enable the checkbox "Dynamic Schema Definition".

GenericFeatureReaderFeatureWriterSample workspace attached.


Forum|alt.badge.img+2
  • November 24, 2021

@shashifile​ if you use Generate on the FME Workspace Main tab then you should only get one Geodatabse reader, but under Parameters be able to select which tables and feature classes you want to include in the translation

image


Forum|alt.badge.img
  • Author
  • November 25, 2021
markatsafe wrote:

@shashifile​ if you use Generate on the FME Workspace Main tab then you should only get one Geodatabse reader, but under Parameters be able to select which tables and feature classes you want to include in the translation

image

fme_test@Mark Stoakes​ 

I know how to read multiple files just that I want to avoid to many readers for each file.

See the attached image where I read 5 feature classes from GDB and I end up having

file readers in the workspace. I just want one reader reading files one after another.


Forum|alt.badge.img
  • Author
  • November 25, 2021
shashifile wrote:

I think I didn't explain myself clearly. If I use File GeoDatabase reader to read 'N' feature classes in GDB then I have to use 'N' File GeoDatabase readers. I couldn't remember how we read all feature classes using one File Geodatabase reader. Similar behaviour is seen when we read features from mxd.

That was Awesome! works for me. Thank you @nielsgerrits​ 


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