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
Contributor
Posts: 37
Registered: ‎11-11-2015

How to download as Shapefile in Geospatial SDK

We have observed that “Download as Shapefile’ command is not working (nothing happens) in Geospatial SDK 16 EP 02. We also observed that JS code is hitting but request is not fired from client to server. Are we missing anything here? Any suggestions?

Staff
Posts: 46
Registered: ‎02-16-2017

Re: How to download as Shapefile in Geospatial SDK

You have configured GDAL  on the server right?need to give the gdal path in web configure as well.

 

vishnu

Contributor
Posts: 37
Registered: ‎11-11-2015

Re: How to download as Shapefile in Geospatial SDK

GDAL is installed on my machine. Web.config file is having entry -

 

<gdalConfiguration ogr2ogrPath="C:\Program Files\GDAL\ogr2ogr.exe" gdalDataPath="C:\Program Files\GDAL\gdal-data" timeout="60000"></gdalConfiguration>

 

 When we click on Download as Shapefile command, nothing is happening. Are we missing anything here?

Staff
Posts: 578
Registered: ‎11-12-2015

Re: How to download as Shapefile in Geospatial SDK

I too thought maybe I was missing something here. Now I see your report and I wonder if there is an issue in the SDK.

 

For me testing this today I see 'FormatConverter' is throwing a 'Server Error' that "Item has already been added. Key in dictionary: 'GDAL_DATA' &nbsp;Key being added: 'GDAL_DATA'"

Is this same symptom you see???

Capture.PNG

 

I dont see how to remove or stop this key from being added.

Contributor
Posts: 37
Registered: ‎11-11-2015

Re: How to download as Shapefile in Geospatial SDK

I am able to debug till below point (newForm.Submit). How can we see the FormatConverter calls?

 

Capture.PNG

Staff
Posts: 46
Registered: ‎02-16-2017

Re: How to download as Shapefile in Geospatial SDK

you can see that the action in the return object is a Format Converter call. However, I think this is something to do with the GDAL. May be the newer version of GDAL has broken this. I tried this last week and I got the same error on the latest SDK. The GDAL originally used to create this was probably 1.x version and the current version is 2.x. Also if you have PostGIS or QGIS on the sytem then it installs GDAL on the system as well and changes the GDAL_DATA path variable in the Environment variables. And we use that variable to run the process.  

 

Vishnu

Staff
Posts: 578
Registered: ‎11-12-2015

Re: How to download as Shapefile in Geospatial SDK

I was able to get the functionality working again on GDAL 201 with SDK 16.02.

I had to uninstall GDAL 201 and ran a registry cleaner (I had previously removed the GDAL environment variable). After restart of the server I installed GDAL 201 again and the functionality appears to be working again after preliminary tests.

Contributor
Posts: 37
Registered: ‎11-11-2015

Re: How to download as Shapefile in Geospatial SDK

Please share us the GDAL download link. Do we need to install full GDAL setup or custom (Core Components and GDAL Utilities)?

Highlighted
Staff
Posts: 578
Registered: ‎11-12-2015

Re: How to download as Shapefile in Geospatial SDK

I used the gdal 201 generic installer for GDAL core compenents from gisinternals

Installed core components and GDAL Utilities only as per the 'How to configure GDAL.pdf' coming with Portal SDK.

 

HTH

 

*my initial tests were good (function worked again to accept .shp and create PSS feature class), but I have to admit I'm not able to test thoroughly at this time so I have not conclusion that downstream workflows will be satisfied too.

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