Hexagon Geospatial
MENU

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
Super Contributor
Posts: 301
Registered: ‎02-09-2016
Accepted Solution

Using GMSC 2016 MapServer to generate an static image of feature instances

[ Edited ]

HI all,

 

We are miragting GMSC application for a our customer from 2014 to 2016. One of the custom function is to generate an image for an input feature instance, addtional parameters are project view or bounding box.

 

Our 2014 version is working fine, but when we are migrating the code from 2014 to 2016 (update with source code with 2016 dll(s), the application is now no longer working and it throws an exception in Intergraph.Emea.Maps.RasterUtil. The exception message is quite confusing. I even de-compiled the dll to trace the root of the exception but still have no idea how to fix that.

 

 

SAPImage 1.png

 

Here is the code that s the exception, the code is similar to the sample posted in GMSC dot net API (2014 version)

SAPImage 2.png

 

 

So I just wonder whether there are other changes in 2016 version that I am not aware of and necessary in order to make it work.

 

Appreciate all the input and suggestions for this matter.

 

Kind regards,

Staff
Posts: 1,034
Registered: ‎10-18-2015

Re: Using GMSC 2016 MapServer to generate an static image of feature instances

Hi,

 

anything useful in the MapService.log file?

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Super Contributor
Posts: 301
Registered: ‎02-09-2016

Re: Using GMSC 2016 MapServer to generate an static image of feature instances

Hi Stefano,

 

Thank you for looking at this. The MapService.log doesn's show anything, I really no idea on what can go wrong.

 

Kind regards

Staff
Posts: 1,034
Registered: ‎10-18-2015

Re: Using GMSC 2016 MapServer to generate an static image of feature instances

Hi Bob,

 

can you please try to put something in the log file on your own? You may put the parameters you are using for your output to understand if all of them are correctly managed. In case you may also debug the application by connecting the remote IIS process.

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Super Contributor
Posts: 301
Registered: ‎02-09-2016

Re: Using GMSC 2016 MapServer to generate an static image of feature instances

[ Edited ]

Hi all,

 

My custom service does have a log service and I double check all input parameters before calling the creating map api.

 

During my investigation, I also de-compile the dll Intergraph.Emea.Map.Services which is responsible for all map services and publishing. One of its actions is using the mostly same code that we do to generate the static image and it is working with our input. Here is an example of calling the core GMSC action:

 

http://localhost/GMSC/Maps/Map?layer=26&xMin=1567769.53&yMin=5180646.94&xMax=1568069.53&yMax=5181046.94&site=GMSC&resX=10224&resY=700&mapOutputType=4

 

Here is the code of the action in the dll Intergraph.Emea.Map.Services

Image 61png.png

 

So, basically the Create Map function of Map server works in the core GMSC function but when our custom function uses it, it shows an exception "The type initializer for 'Intergraph.Emea.Maps.RasterUtil" threw an exception". I believe there are some compulsory components that need to be initialized and we don't know how to do it in our function, and that change seems to appear in GMSC 2016.

 

Here is the detail on how we deploy our function. Hopefully, someone can give us some suggestions on what goes wrong.

 

  • Firstly, our map generation service is a WCF service with Restful enabled, developed for GMSC 2014. I fix some API syntaxes and re-compile it for GMSC 2016.
  • Our service is deployed by placing the dll in GMSC Program bin folder and add its service endpoint to the GMSC web.config. I need to deploy the service this way in order to access the GMSC site; if I deploy the service in different folder than we can't initialize the GMSC site.
  • Image 2png.png   

Image 3png.png

 

I also attach our source code and deploying components if someone is interested in looking at this. 

 

http://filetransfer.intergraph.com/workflow/GET/PL1AB162B3ZACVIF

 

 

Appreciate all the insights and suggestions

 

Kind regards,

 

 

Technical Evangelist
Posts: 178
Registered: ‎03-03-2016

Re: Using GMSC 2016 MapServer to generate an static image of feature instances

You need to copy the gdal folder from INSTALLDIR\Program into your application's bin folder. GDAL native libraries are needed at runtime.

Highlighted
Super Contributor
Posts: 301
Registered: ‎02-09-2016

Re: Using GMSC 2016 MapServer to generate an static image of feature instances

Thank you so much Thomas for your suggestions. I copy these gdal dlls (those from Maps/bin folder) and it starts working

 

Image 0.png

 

 

Kind regards

 

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.