IMAGINE Discussions

Discuss and share topics of interest using ERDAS IMAGINE the world’s leading geospatial data authoring system.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Frequent Contributor
Posts: 106
Registered: ‎06-03-2016
Accepted Solution

Feature Validation / MeasurePolygon errors with "Unsupported field type"

Folks, 

 

The MeasurePolygon example in the documentation is simple enough, but I get a couple errors: 

 

 

23/07/16 12:46:18 SessionMgr(2376): Unspecified function failed
23/07/16 12:46:18 Unsupported field type
23/07/16 12:46:18 SessionMgr(2376): Spatial model execution failed.

 

 

My suspicion was that the centroid computation failed due to some sort of invalid geometry. Most of the features in my layer are simple polygons, but I found at least one with a hole and don't think I have multi-polygons (all of which are supoprted geometry types though). I ran the same recipe on a point layer but IMAGINE kept crashing. My shapefile had a custom projection (though that shouldn't matter), so I changed the projection definition and the recipe worked on points, which points a finger back at my polygons. QGIS' validation, however, reported no geometry errors and although each system has its own threshold for what's considered an error, I'm confident I don't have eggregious errors. 

 

[1] Is there a FeatureValidation operator that could prevent recipes from being derailed by bad input?

 

[2] Anyone have experience with MeasurePolygon that could offer suggestions?

 

 

 

Highlighted
Frequent Contributor
Posts: 106
Registered: ‎06-03-2016

Re: Feature Validation / MeasurePolygon errors with "Unsupported field type"

[ Edited ]

This is a workaround (likely not the best) for avoiding the "Unsupported field type" error when using the MeasurePolygon operator. 

 

Poor man's polygon cleaner [1] Convert your features to raster then [2] back to features.

 

Theorectically I suppose this would address occluded and/or slivers, but I'm pretty confident my data's good. 

 

Anyhow, the image below shows an error is MeasurePolygon is used straightaway and the lower path shows that operaor succeed with the roundabout cleaner.

 

 

Regards

 

Highlighted
Frequent Contributor
Posts: 106
Registered: ‎06-03-2016

Re: Feature Validation / MeasurePolygon errors with "Unsupported field type"

It appears the problem lies not with my geometries, but some of my attribute columns in my feature layer. I haven't yet investigated which ones, but my columns were all text types up to 80 chars in length. A few column names were prefixed with underscores and some columns stored hyperlinks. Again, not sure which was the offender, but in hindsight the error message was spot on...

 

I used QGIS to remove all but 2 text columns and the recipe skated right on through MeasurePolygon.

 

Highlighted
Frequent Contributor
Posts: 106
Registered: ‎06-03-2016

Re: Feature Validation / MeasurePolygon errors with "Unsupported field type"

Feature attribute column names that begin with underscores are not supported.

 

 

Highlighted
Staff
Posts: 14
Registered: ‎07-11-2016

Re: Feature Validation / MeasurePolygon errors with "Unsupported field type"

It looks like you found a work around and a resolution.

 

There is no validate geometry operator partly because it was not intention of the spatial modeler to reject any specfic geomtery for all operators but it is the responsibilty of the operator to process it appropriately and report if it cannot handle a certain type. 

 

It seems like measure polygon is handling it properly. If some operator does not then that will be a defect and it needs to be fixed. Please do report it in case you find one.

Highlighted
Staff
Posts: 14
Registered: ‎07-11-2016

Re: Feature Validation / MeasurePolygon errors with "Unsupported field type"

The inability to process fields starting with "_" seems like a defect. We will investigate it. Thanks for identifying it.

Highlighted
Frequent Contributor
Posts: 106
Registered: ‎06-03-2016

Re: Feature Validation / MeasurePolygon errors with "Unsupported field type"

Thank you, Kumar.

 

I see. So operators only have "type" validation? Is there any plan to add "content" (e.g., feature) validation to help relax the modeler's all-or-nothing execution policy? Theorectically, my model can tolerate some loss in data, but the gap is in lowering the threshold from the 100% clean assumption.

 

From UX and dev perspectives, identifying and filtering invalid geometries, for example, would allow the model to continue or have a controlled exit rather than error out with a message that users (and often developers) won't understand. Be nice to have. 

 

Thanks again for chiming in!

Highlighted
Staff
Posts: 14
Registered: ‎07-11-2016

Re: Feature Validation / MeasurePolygon errors with "Unsupported field type"

[ Edited ]

Each operator should have that test and should deal with them. And some cases it seems to error out which may be desirable.

 

It will be interesting to identify those use cases. Coming up with requirement for a generic operator is complicated as the definition of invalid feature/geometry is subjective to the operator that is operating on it.

 

Anyways, I will bring it up with the teams for future development.  Thanks for the feedback.