09-24-2018 02:43 AM - edited 09-24-2018 02:43 AM
I am trying to download a WFS as shapefile but i keep getting followingerror:
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'
[ArgumentException: Item has already been added. Key in dictionary: 'GDAL_DATA' Key being added: 'GDAL_DATA'] System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +14820240 FormatConverter.GdalJsonToShapefileConverter.InvokeConvert(String options) in C:\Dev\Work\xxxxxxxx\src\FormatConverter\GdalJsonToShapefileConverter.cs:55 FormatConverter.FormatConverter.ConvertGeoJson2Shapefile(HttpContext context, String jobDirectoryPath) in C:\Dev\Work\xxxxxx\src\FormatConverter\FormatConverter.cs:67 FormatConverter.FormatConverter.ProcessRequest(HttpContext context) in C:\Dev\Work\xxxxxxx\src\FormatConverter\FormatConverter.cs:45 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +798 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +91
09-24-2018 02:52 AM
You might already have this environment variable set by GDAL installer and our software tries to register it again. Try to delete the GDAL_DATA env. variable
and use only the one defined in web.config:
09-24-2018 03:13 AM
Is this Portal SDK then? You can try the other way around and comment out this section in FormatConverter project (then rebuild the solution):
I'd also try to restart WWW service to make sure the environment variable was not cached.
Following topic also hit this problem and it helped to reinstall GDAL + restart the server.