Hi,
if reading a GeoTiFF with crs epsg=31466 MapSuite raise an exception.
The index was out of range. He must be non-negative and less than the Collection.
Parameter: index.
Other crs working fine.
Public
Function
LoadGeoTiffLayer(LayerPath
As
String
, EPSG
As
Integer
)
As
GeoTiffRasterLayer
Try
Dim
TiffRasterLayer
As
GeoTiffRasterLayer
Dim
fileExists
As
Boolean
fileExists = My.Computer.FileSystem.FileExists(LayerPath.ToLower.Replace(
".tif"
,
“.tfw”
))
If
fileExists
Then
TiffRasterLayer =
New
GeoTiffRasterLayer(LayerPath, LayerPath.ToLower.Replace(
".tif"
,
“.tfw”
))
Else
TiffRasterLayer =
New
GeoTiffRasterLayer(LayerPath)
End
If
With
TiffRasterLayer
.IsVisible =
False
Dim
ImageProjection
As
New
ManagedProj4Projection
ImageProjection.ExternalProjectionParametersString = ManagedProj4Projection.GetSphericalMercatorParametersString
ImageProjection.InternalProjectionParametersString = ManagedProj4Projection.GetEpsgParametersString(EPSG)
ImageProjection.Open()
.ImageSource.Projection = ImageProjection
.Name = LayerPath
.Open()
End
With
Return
TiffRasterLayer
Catch
ex
As
Exception
c_lastError &= ex.Message & vbNewLine
Debug.WriteLine(ex.Message)
Return
Nothing
End
Try
End
Function
I’m using Daily Full Development 9.0.229.0
Any idea?
Regards
Hardy