Skip to main content
Open

Limit or chose preference of which Feature Types to read in Generic FeatureReader

Related products:Integrations
danilo_fme
chk1
db_apha
felipeverdu
  • danilo_fme
    danilo_fme
  • chk1
    chk1
  • db_apha
    db_apha
  • felipeverdu
    felipeverdu

chk1
Contributor
  • Contributor

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:

 

2 replies

felipeverdu
Enthusiast
Forum|alt.badge.img+10
  • Enthusiast
  • June 24, 2024

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!


LizAtSafe
Safer
Forum|alt.badge.img+15
  • Safer
  • September 3, 2024
NewOpen

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