Skip to main content
Question

Identify Changes in the GIS Schema / SchemeScanner?


galigis
Enthusiast
Forum|alt.badge.img+16

Hi All,

I’m working on a workbench to help my team with some geo-processing. The plan is to upload the workbench to FME Flow therefore my team can run it on demand.

I have included a FeatureReader transformer at the beginning of the workflow to read a GDB containing cadastral polygon data. This is an User Parameter in the workbench therefore the user will be including the input.

The GDB should always have the same fields/order, any variation in the scheme...the tool will fail,

How can I check and inform the user at the beginning of the process that the scheme doesn’t follow the standard GIS schema?

I was think about the SchemeScanner or ChangeDetector...but open to suggestions

Here is a very basic screenshot that shows two FeatureReaders → Features To Read (Only Schema),

 

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

One way to do this is to make use of a FeatureReader only reading the schema, then test the schema feature with what you need / expect, and if it validates use a second FeatureReader to read the data.

The schemafeature is just a feature with a list with the attributes, so you can explode these and use a featuremerger to check if any of the attributes you need exist in the way you expect them. If you have one or more unmerged features, then the validation fails.


galigis
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • April 24, 2024

Thanks @nielsgerrits It worked thanks, below an screenshot of your proposed solution for completeness:

 

 


nielsgerrits
VIP
Forum|alt.badge.img+54
nielsgerrits wrote:

One way to do this is to make use of a FeatureReader only reading the schema, then test the schema feature with what you need / expect, and if it validates use a second FeatureReader to read the data.

The schemafeature is just a feature with a list with the attributes, so you can explode these and use a featuremerger to check if any of the attributes you need exist in the way you expect them. If you have one or more unmerged features, then the validation fails.

Attached sample demonstrating this:

 


liamfez
Influencer
Forum|alt.badge.img+34
  • Influencer
  • April 24, 2024

As far as the “informing the user” part of your question. You could set up a terminator with a custom message detailing the failure due to schema mismatch, maybe include their schema vs what was expected.


geomancer
Evangelist
Forum|alt.badge.img+48
  • Evangelist
  • April 24, 2024

On FME Flow present the workspace as a Workspace App. Let the workspace use the Data Upload Service, so users can upload their files to use in the workspace.

Let the workspace create an HTML page to show results, including a description of errors the workspace encounters while processing the input.

Use HTMLReportGenerators for the different parts of the HTML page, and HTMLLayouter to combine the parts into one HTML page.

 


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