Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Occasional Contributor
Posts: 5
Registered: ‎11-07-2018

How to display shape file information on the VIEWER screen

Hello.

 

I want to read a shape file Infomation(Polygon)
and display it on the VIEWER screen by using IMAGINE Developers' Toolkit API.

 

Please tell me how to do it.

Highlighted
Technical Evangelist
Posts: 57
Registered: ‎09-16-2015

Re: How to display shape file information on the VIEWER screen

evue_OpenVectorLayer(app->connection, (Emsc_Pointer)app->displayHandle, "c:/data/polygons.shp", "c:/data/polygons.evs", EVEC_SINGLE_PRECISION, &lclerr);

 

Obviously, "c:/data/polygons.shp" would be the path to your shapefile.  "c:/data/polygons.evs" would be the path to an ERDAS IMAGINE symbology file to be used when displaying the layer.  If you don't have one, you can pass NULL.

 

Highlighted
Occasional Contributor
Posts: 5
Registered: ‎11-07-2018

Re: How to display shape file information on the VIEWER screen

Thank you very much. Polygon was displayed.


May I ask even more?

How can I change the color of Polygon by using IMAGINE Developers' Toolkit API.
Also, can I change the color for each Polygon?

Highlighted
Staff
Posts: 158
Registered: ‎06-30-2016

Re: How to display shape file information on the VIEWER screen

[ Edited ]

The symbology (style) for the shapefile is specified via the evs file, which is one of the parameters above. You will have to create the evs file based on a shapefile that has similar attribute.