Skip to main content
Question

GML in generic reader through Add reader as a resource


hlynur
Contributor
Forum|alt.badge.img+6

Hello, have bumped into the problem of generic reader not being able to read a GML and have read the literature on how to circumvent this by adding a separate reader as a resource to make the generic reader understand my GML’s. But I cannot get it to work the reader just runs and doesn't find data, no error or warning, Total Features Read 0.,

So my GML is pretty straight forward as there is no problem getting FME to read it with a OGC GML reader without needing to set XSD schemas and so forth, just reads it in by default. I have tried various settings in a GML reader that have all worked and then copied that workflow when I add the reader as a resource without any luck.

Have I overseen some step here or any ideas what I might be doing wrong?

 

Send hilfen, Hlynur

 

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

I’m not familiair with this specific problem, but why would you not solve this using multiple FeatureReaders, one for each specific type?


hlynur
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • March 18, 2025

Hey ​@nielsgerrits and thanks for response, we have one-stop-shop conversion tools on our Flow where users can drop various kinds of file formats and convert it into various kinds of file formats, so generic to generic (where the user selects the output format from a dropdown).

So having a generic GML to other fomat’s would be the lesser feasible option.


crystalatsafe
Safer
Forum|alt.badge.img+18

Hi ​@hlynur 

This is an issue with how the Generic Reader works with formats that share a common extension, in this case, .gml. Specifically, when the generic reader recieves a file, it goes down the list of formats in formats.db until it finds an entry with a matching file extension.

It will use the first match to read the data (this is why we are seeing AIXM readers opened in the logfile, opposed to GML/INSPIRE).

We suspect, because the reader is being opened as AIXM (and the Reader as a Resource is not an AIXM Reader), they aren't speaking to each other properly, and no parameters are passed.

This is our workaround

  • Add a Directory and File Path Reader
  • Test or filter datasets based on format extension (TestFilter)
  • Route data to an appropriate FeatureReader where the XSD can be referenced explicitly

If you need any help building this out, please reach out to us.


hlynur
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • April 7, 2025

Thanks for this ​@crystalatsafe just wondering about Directory and Path Reader for a Flow tool where the user just drags and drops a file, how do we incorporate a Directory and Path Reader for that without it just turning an error (as it is a file that kick it off)?

-Hlynur


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