Skip to main content
Question

GeoJSON to GDB - Dynamic Schema Issue on Writer


tbarker1986
Contributor
Forum|alt.badge.img+5

Hi All, I’m having an issue writing out to GDB with a schema dataset. The workflow extracts multiple GeoJSONs from some GSI open Datasets (example path below), clips them to an AOI and extracts them to a GDB. There are around 50 datasets in total .

The actual reading of the data seems fine:

  • data features = Geojson format read through a feature reader
  • schema reader = Schema Feature (Any Dataset) format reading the Geojson (n.b. when reading using the schema port of the feature reader, I can’t get it to read schema from multiple datasets, hence why have this separate)

I am writing through a FeatureWriter - see settings in screenshot below.

The annoying thing is that sometime it works, then I select a new set of features and then it doesn’t, and I can’t seem to find a pattern. However checking the input table before the Writer, everything (I think) looks ok. It feels like there must be something that is not right, but just can’t seem to pinpoint it. Any ideas would be greatly appreciated 🙂? Further screenshots on settings and errors are below.

FME Version: 2024.2.4

Example GeoJSON Path: https://gsi.geodata.gov.ie/server/rest/services/Bedrock/IE_GSI_Bedrock_Boreholes_Verified_50K_IE26_ITM/FeatureServer/0/query?where=1=1&outFields=*&f=geojson

FeatureWriter Settings (and Parameters)


Feature Readers (n.b due to a limit of 2000 features per Geojson call, I am reading 2000 features at a time from each dataset and feeding this to an offset clause in the GeoJSON string, hence why 13 features are going into the dataset when there are only 5 datasets being read)

FeatureWriter Error and settings

 

Attribute Table at FeatureHolder (just before Writer)

 

9 replies

j.botterill
Influencer
Forum|alt.badge.img+40
  • Influencer
  • June 20, 2025

Check all the coordinate systems are all set the same… and re-projected to a common grid. Perhaps you feature writer needs explicit coordinate system set on the writer parameters. You’d have to also check all the coordinate system timestamps in the log


tbarker1986
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • June 20, 2025

Thanks for the reply ​@j.botterill. The coordinate system for the data features is reprojected to EPSG:2157 before the writer. Just tried to hard code it into the writer parameters too based on your suggestion, but still having the same error. Log file attached (run from FeatureHolder cache) if that helps. 
 


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • June 20, 2025

That error normally occurs when the schema isn’t hitting the featurewriter before the features being read. That would explain why it is intermittent, especially if you are sometimes running in feature caching mode. I normally end up doing something like this.

 


tbarker1986
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • June 20, 2025

Thanks for the reply ​@ebygomm. The current flow I have adds an order field to the schema features and data features, so that Schema features are read first (see screenshot in the original message). I also included a FeatureHolder just before the write to make absolutely sure that schema features were present before trying to write any data. Another reason why I’m a little confused why the flow is failing on the feature type definition error.


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • June 20, 2025

Have you tried setting Geometry to From Schema Definition (I don’t think this should be an issue but worth a try)

 

Edit: I didn’t realise they hadn’t change the way the feature reader works with geojson to read multiple schemas yet


tbarker1986
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • June 20, 2025

Have tried changing to Geometry from Feature Schema, but getting the same result. It looks as if it runs successfully when only 1 dataset is read at a time - so going to create an initiator workbench which runs this workbench one dataset at a time, and hopefully that will then get this working. Will let you know how it goes. Any other thoughts in why this is happening are appreciated in the meantime!

Not sure why the feature reader for geojson can’t read multiple schemas - seems a little odd.


j.botterill
Influencer
Forum|alt.badge.img+40
  • Influencer
  • June 23, 2025

The schema feature must arrive to the feature writer first, prior to the data feature. So the featureHolder should be on the data stream


tbarker1986
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • July 1, 2025

Thanks ​@j.botterill, I tried your suggestion and had the same error when running on multiple datasets - however seems to be consistently working on 1 dataset at a time. As such, have set up an initiator workbench where datasets are chosen, then using a WorkspaceRunner to process 1 at a time - seems to be working well on Form & Flow now. Still confused as to why multiple datasets can’t be exported at the same time, but at least this is a workaround.

 

Thanks everyone for your help looking into this!


j.botterill
Influencer
Forum|alt.badge.img+40
  • Influencer
  • July 2, 2025

Hmm, thats a good approach. I also thought the Sorter might make use of Group by processing, setting it to fme_feature_type/fme_feature_type_name


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