Skip to main content

TL;DR: Allow me to set a list of pfererred file types to read in a Generic Reader and FeatureReader.

Background: When feeding files into a Generic Reader or FeatureReader, it appears that FME (Form/Flow) selects one format automatically from its available formats in alphabetical order, for example:

  • .gml: AIXML5
  • .gpkg: GEOPACKAGE_RASTER
  • .json: CITYJSON

I’m working with geospatial vector data, so instead I’d prefer:

  • .gml: GML
  • .gpkg: OGCGEOPACKAGE
  • .json: GEOJSON

There’s currently no way set a preference, an allow- or blocklist to set which formats to use or not.

Some workarounds I found on these forums:

  • Rename files (not viable for user-provided data)
  • Build my own mapping with a FileNameExtractor to get the extension → AttributeValueMapper and feed it into a FeatureReader (may be error-prone)
  • Create a custom format that starts with AAAAA… to place it at the start of the alphabetical list

Related forum posts and somewhat similar ideas:

 

As described here (Restricting file types read when using a generic reader to read data from a ZIP file | Community (safe.com)), the generic reader does not read json files. it would be nice to add this to the generic reader!


New→Open