Skip to main content
Solved

read any feature classs or file GDB as an input


Hi,

I created an FME workbench which reads an esri line feature class thethen assigns a color based on an attirbute to create a KML file that is color coded. I want t to put this up on my fme server. at the moment it only reads a specific feature class file from a folder on my c:.

In future I would like to run my workspace on FME server and throw any feature class or file GDB into my C: folder and if it has the attribute field to assign colors then the process will run and create the color coded Kml.

I'm not sure what transformer to use for the input and what other options I have in FME server to upload the file.

any ideas would help

thanks

Best answer by lars_de_vries

Hi @gislogan01,

you could use a generic reader to read all file types. Also you could use a 'Path and Filename'-reader to see what is available on C:\\ and use a FeatureReader to read the files you want to read.

Next you could use a TestFilter to test whether a color column is present. However you will need te define something to test for colour values. Because there are a lot of possible color-codes that will be hard.

A possibility to check all values is to use an AttributeExploder that will create sets of 'attribute name'-'attribute value'. That way you can check every value, but again you will need to think about how to check against color coding. If it always has the same built-up, you could check on that using 'Contains Regex'.

Hope this helps.

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

4 replies

lars_de_vries
Forum|alt.badge.img+10

Hi @gislogan01,

you could use a generic reader to read all file types. Also you could use a 'Path and Filename'-reader to see what is available on C:\\ and use a FeatureReader to read the files you want to read.

Next you could use a TestFilter to test whether a color column is present. However you will need te define something to test for colour values. Because there are a lot of possible color-codes that will be hard.

A possibility to check all values is to use an AttributeExploder that will create sets of 'attribute name'-'attribute value'. That way you can check every value, but again you will need to think about how to check against color coding. If it always has the same built-up, you could check on that using 'Contains Regex'.

Hope this helps.


  • Author
  • April 4, 2018

Ok, thanks @lars_de_vries, kind of got it.

I used path reader to get the c: location then a feature reader to read the GDB, then a reprojector to a test filter to show the attributes, then link the attributes to a kml styler. but im not sure how to finish it off what writer to use. because i want the output to be a set of KMl files for each feature class in the GDB not just one kml file. any ideas? :)


  • Author
  • April 4, 2018

@lars_de_vries thanks mate, how do i get the kmls to be one for each feature class not just one kml


lars_de_vries
Forum|alt.badge.img+10
gislogan01 wrote:

Ok, thanks @lars_de_vries, kind of got it.

I used path reader to get the c: location then a feature reader to read the GDB, then a reprojector to a test filter to show the attributes, then link the attributes to a kml styler. but im not sure how to finish it off what writer to use. because i want the output to be a set of KMl files for each feature class in the GDB not just one kml file. any ideas? :)

If you go to the Writer settings in the Navigator pane, you'll the option to 'Fanout Dataset'. If you set this option to 'yes' and choose the fme_feature_type attribute as your Fanout Expression, you'll get a KML for each feature class in the GDB.

 

 


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