04-24-2018 10:38 PM
I am using IMAGINE Developer's Toolkit 2016 Version.
I want to make polygon fill detection of annotation file with StyleLibrary.
In StyleLibrary_5, styleLibrary-> fillStyles.data becomes NULL and abnormal end.
I am using the following code.
int isFill = styleLibrary->fillStyles.data[polygon->fillStyle].fill;
styleLibrary get emif_DictionarySearchByName function, and polygon get ehfa_ObjectReadIfPresent function.
How to make polygon fill detection of annotation file with StyleLibrary_5.
In Style Library_4, it was possible to make polygon fill detection of annotation file with this code.But, for the second parameter of the emif_DictionarySearchByName function Using StyleLibrary_4 become an error in ERDAS IMAGINE 2016 Version.
If you have a way to use "StyleLibrary_4", that way is fine.
04-25-2018 10:51 AM
You should not be using low-level packages such as ehfa and emif to read annotation elements and style information from a file. Instead you should be using eant_LayerOpen to read the entire annotation layer, including elements and style information, at once. You can then access the elements using antlayer->antInfo->headElm and the style library using antlayer->antInfo->styleLib. You should not, however, access members of the Eant_StyleLibrary directly. Use eant_GetFillStyle to get the Eant_FillStyle for the element (polygon) and then query the fill member of the returned structure. Use eant_GetPolygonMapVectorData to obtain the coordinates of the polygon. There are many other eant_Get* functions and even more eant_* functions you might want to explore as well.
I hope this helps.
05-17-2018 05:35 PM
Thanks for the answer.
I understand that eant function shoud be used.
However, if I replace with the eant function,
I will need to change a massive amount of the program I am currently working on.
So I would like to replace as minimal parts as possible.
Please provide me with a way to use eant_GetFillStyle function and
eant_GetPolygonMapVectorData function with a Created StyleLibraryType
structure by either converting or wrapping.
> There are many other eant_Get* functions and even more eant_* functions.
Please give me any sample code of eant function.
05-24-2018 05:23 PM
I am still working on this issue.
I would like to compare codes between using low level
emif library and higher level eant library in order to do polygon fill detection.
Please provide me with sample codes for polygon fill detection using the eant library.
05-25-2018 10:36 AM
Attached is an example of reading an OVR file and converting it to DXF. Any eant functions you would need to use should be used in this example.
I hope this helps!
08-05-2018 11:17 PM