Solved

I'm trying to create a self service FME Server workspace app, that will accept, as an input, either a shapefile or an FGDB feature class. Is this possible?


Badge

I want to be able to present the user with a single input option that will accept either a shapefile or an FGDB feature class. It doesn't seem possible to me because:

 

  • the generic reader doesn't seem to allow you select an FGDB
  • I can't have a shapefile reader and an FGDB reader in my workspace, but only use one

 

Am I really going to have to create 2 workspace apps, one that processes shapefiles and one that processes FGDB feature classes?

 

FME Desktop 2021.2 and FME Server 2021.2.

icon

Best answer by david_r 7 June 2022, 11:53

View original

4 replies

Userlevel 4

You don't have to use the generic reader, simply use two different FeatureReaders, for example:

imageThat said, I'm fairly sure the generic reader is able to read a FGDB.

Badge

You don't have to use the generic reader, simply use two different FeatureReaders, for example:

imageThat said, I'm fairly sure the generic reader is able to read a FGDB.

Thanks @david_r​. So, if I understand you correctly, I need a (required) published parameter to identify whether the user is going to upload a shapefile or an FGDB, then 2 (optional) published parameters for the shapefile/FGDB file paths?

 

User Parameters

Userlevel 4

Thanks @david_r​. So, if I understand you correctly, I need a (required) published parameter to identify whether the user is going to upload a shapefile or an FGDB, then 2 (optional) published parameters for the shapefile/FGDB file paths?

 

User Parameters

That could be one way of doing it. Or you could support a single zip file, then check the contents of the zip file in FME (you can point a FeatureReader using the "Directory and File Pathnames" reader to the zip file) and redirect to the appropriate reader, depending on what you find inside.

Badge

Thanks @david_r​. So, if I understand you correctly, I need a (required) published parameter to identify whether the user is going to upload a shapefile or an FGDB, then 2 (optional) published parameters for the shapefile/FGDB file paths?

 

User Parameters

Thansk. I'll try that out.

Reply