03-28-2018 07:51 AM
today I have done some tests using the "Convert to Features" in simple models like these:
The attribute of the raster are these:
This is the raster:
If the 'isClumped' flag is set to false the feature in output does not contain all the attribute fields from the raster:
If I set the 'isClumped' flag to true the output feature contains the raster attributes:
Why If the 'isClumped' flag is set to false the attribute are not available?
If I use the Raster to Shapefile button in the ribbon it works.
I have tested this issue with different thematic images on the both the ERDAS VERSION, 2016 and 2018.
Thank you very much
03-29-2018 02:13 AM
That's because of the way how Clump function has always worked. It doesn't transfer attributes to the output image.
So, in case of Convert to Features operator, if you turn the IsClumped to False, the Convert to Features operator has to perform a Clump and does not attempt to transfer attributes. There is an idea placed for Convert to Features operator - https://community.hexagongeospatial.com/t5/Product-Ideas/Allow-Convert-to-Features-operator-transfer...
There are 2 solutions meanwhile:
2. If you intend to use model in Smart M.Apps environment, so it will not allow you to run executable via Command Line. You can do Clump before converting to features. After Clump, you need to reattach attributes. Below is an example of how to transfer Class Names to the output raster. You can do the same for other classes you need. Then try to convert to features with IsClumped option turned to True
03-29-2018 02:24 AM
Just was lightened by another idea. Same way as you re-add attributes after Clump, you can re-attach attributes after Convert to Features operator. Here is an example:
03-30-2018 05:05 AM
This Spatial Recipe utilises the approach Marina suggests above to transfer attributes from an original raster to derived point features.