Hi Ethan,
Thanks for your help.
I have some deployment issues on a client machine.
I describe below the various problems I encountered
- When I launch our application, I have an error message telling me that it is missing 2 dlls (msvcr120d.dll et msvcp120d.dll).
I have this message regardless of the debug or release build mode.
To overcome this problem, I recovered these dlls and I copy them among the deployment dlls of our application.
The error message no longer appears.
However, I have another problem with raster jp2.
When I launch the application, I have the following error.
Message : La valeur ne peut pas être null.
Nom du paramètre : ptr
Source : mscorlib
Module : mscorlib.dll
Exception : System.ArgumentNullException: La valeur ne peut pas être null.
Nom du paramètre : ptr
à System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t)
à ohM=.iEc=.Q0c=()
à ohM=.h0c=.eyQ=(String fileName)
à ThinkGeo.MapSuite.Layers.Jpeg2000RasterSource.OpenCore()
à ThinkGeo.MapSuite.Layers.RasterSource.Open()
à ThinkGeo.MapSuite.Layers.Layer.Open()
à Workspaces.Cartographie.Layers.MultiGeoRasterLayer.BuildReferenceFile(String newReferencepathFileName, String pathOfRasterFiles, Boolean inclureSousRépertoires) dans C:\Steph_TFSMain\Projets Vegetal\Workspaces\Cartographie\Workspaces.Cartographie\Layers\MultiGeoRasterLayer.cs:ligne 202
Loaded assemblies:
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Divers.Portail.UI, Version=3.0.0.20978, Culture=neutral, PublicKeyToken=null
PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The corresponding code in the class MultiGeoRasterLayer is : (in bold).
using (var streamWriter = File.CreateText(newReferencepathFileName))
{
foreach (var file in files)
{
var rasterRasterLayer = CreateLayer(file);
if (rasterRasterLayer != null)
{
try
{
if (NomLayer!=null) rasterRasterLayer.Name = NomLayer;
**if (!rasterRasterLayer.IsOpen) rasterRasterLayer.Open();**
var boundingBox = rasterRasterLayer.GetBoundingBox();
rasterRasterLayer.Close();
streamWriter.WriteLine(
$"{boundingBox.UpperLeftPoint.X.ToString(CultureInfo.InvariantCulture)};{boundingBox.LowerRightPoint.X.ToString(CultureInfo.InvariantCulture)};{boundingBox.UpperLeftPoint.Y.ToString(CultureInfo.InvariantCulture)};{boundingBox.LowerRightPoint.Y.ToString(CultureInfo.InvariantCulture)};{file}");
}
catch (Exception ex)
{
Trace.TraceException(ex);
Trace.TraceInfo("Raster défectueux : {0}", file);
}
finally
{
}
}
}
}
}
When I use .tif rasters, I have no problem, I can see the raster in our application.
Do you know where the problem may come from?
Thanks .
Regards.
Steph.