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
Contributor
Posts: 38
Registered: ‎04-14-2016

import Shapefile in Geospatial Portal

Hi all,

I have a problem to configure import Shapefile function on my SDK portal instance.
I have tried to follow instructions from https://community.hexagongeospatial.com/t5/Developers-Knowledge-Base/How-to-configure-GDAL/ta-p/3987
but I still can not import shp.

When I click on the import shape button on SDK instance, I can load shp, shx, prj and dbf, but than nothing happen.

In developer tools, the Network tab I can see the following error:
--------
Server Error in '/PortalSDK' Application.
Could not find file 'C:\Users\DefaultAppPool\AppData\Local\Temp\format-converter\fc3afded-8ce6-4263-ac0e-f3ac5ec2c10c\tempfile.json'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not find file 'C:\Users\DefaultAppPool\AppData\Local\Temp\format-converter\fc3afded-8ce6-4263-ac0e-f3ac5ec2c10c\tempfile.json'.

Source Error:


Line 88: }
Line 89: var m = new MemoryStream();
Line 90: using (var s = new FileStream(_jsonPath, FileMode.Open))
Line 91: {
Line 92: StreamUtils.TransferStream(s, m);
--------

I have tried with advices from:
https://community.hexagongeospatial.com/t5/Developer-Discussions/How-to-call-Json2Json-in-server-if-...
but when i comment that line I got new error:
--------
Server Error in '/PortalSDK' Application.
Item has already been added. Key in dictionary: 'GDAL_DATA' Key being added: 'GDAL_DATA'
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Item has already been added. Key in dictionary: 'GDAL_DATA' Key being added: 'GDAL_DATA'

Source Error:


Line 78: }
Line 79: };
Line 80: p.StartInfo.EnvironmentVariables.Add("GDAL_DATA", _gdalDataFolder);
Line 81:
Line 82: p.Start();


Source File: D:\SDK\portal-sdk-application-portal-sdk-package\src\FormatConverter\GdalShapefileToGeoJsonConverter.cs Line: 80
--------

 

Any advice???

 

Best regards,
Mladen

Highlighted
Contributor
Posts: 38
Registered: ‎04-14-2016

Re: import Shapefile in Geospatial Portal

Hi All,

 

Is there any idea?

 

Regards,

Mladen