ThinkGeo.com    |     Documentation    |     Premium Support

GdalProjectionConverter - EntryPointNotFoundException

ThinkGeo Team,

I’m attempting to upgrade a V14.2 project from using UnmanagedProjectionConverter to using GdalProjectionConverter.

The GDAL converter appears to be working. However, invoking the following results in an exception:

TheVertex = TheAssetsStatic.aGdalProjectionConverterForLatLong.ConvertToInternalProjection(TheLongitude, TheLatitude);

The above line compiles without error. It would appear, from the exception, that ConvertToInternalProjection in not defined in the lower levels. Attempting to invoke ConvertToExternalProjection results in the same exception.

Below are the Project Dependencies.

Regards,
Dennis Berry

System.EntryPointNotFoundException

HResult=0x80131523
Message=Unable to find an entry point named ‘?’ in DLL ‘osr_wrap’.
Source=osr_csharp
StackTrace:
at OSGeo.OSR.OsrPINVOKE.new_CoordinateTransformation__SWIG_0(HandleRef jarg1, HandleRef jarg2)
at OSGeo.OSR.CoordinateTransformation…ctor(SpatialReference src, SpatialReference dst)
at ThinkGeo.Core.GdalProjectionConverter.ny0=(Projection srcProj, Projection destProj, IEnumerable1 vertices) at ThinkGeo.Core.GdalProjectionConverter.ConvertToInternalProjectionCore(IEnumerable1 verticies)
at ThinkGeo.Core.ProjectionConverter.ConvertToInternalProjection(Double x, Double y)
at OriStarWmsClient.MapMethods.d__4.MoveNext() in C:\OriStarMappingIncThinkGeoUI-V14.2.0Secondary\OriStarWmsClient\TheMapMethods.cs:line 212

image

Hi Dennis,

I’m wondering this doesn’t work at all or it works for some cases but not for some else?

Never saw this message before: Unable to find an entry point named ‘?’ in DLL ‘osr_wrap’. Any chance you recreate it in a standalone project and send over to me? I have a feeling it has something to do with the system encoding or the gdal dependencies or something, but not sure.

Thanks,
Ben

hi Ben,

It doesn’t work at all.

The code successfully instantiates & opens the GdalProjectionConverter.

Give me a couple days and I’ll see if I can recreate this in another standalone project.

Maybe it has something to do with the fact that ThinkGeo.Gdal is included as a transitive package under ThinkGeo.MrSid.

This is how it’s defined:

ThinkGeo.Core.GdalProjectionConverter aGdalProjectionConverterForLatLong;

Thanks,
Dennis

Hi Dennis,

Since V14.2, ThinkGeo.MrSid is deprecated and not needed anymore. You can just use MrSidGdalRasterLayer in ThinkGeo.Gdal.

The HowDoI sample has been upgraded to use ThinkGeo.Gdal. In fact you can see if HowDoI Works on your computer, it will probably not if that’s an issue on the system.

samples/wpf/HowDoISample/Samples/MapOfflineData/Raster/DisplayMrSidFile.xaml.cs · master · ThinkGeo / Public / Desktop Maps · GitLab

Thanks,
Ben