11-24-2020 12:20 AM
one of our customers has upgraded GeoMedia from version 22.214.171.1249 to version 126.96.36.1990. After short tests we came to the conclusion that our software also needs to be updated. This I have done, too, by updating the used dll's from GeoMedia.
Most functions are working to this dll update, however the “DGMGeometryStorageService.SetGeometry” don’t. I’m trying to pass the object of type GField and RasterGeometry to the method SetGeometry.
The first time the data is loaded, "Invalid geometry object; IGMGeometry is not supported”, the following attempts always result in the exception "Value does not fall within the expected range".
I also tried to use GeometryToStorage instead of SetGeomtry, without success.
I assume that the transferred parameters no longer correspond to the GeoMedia Api. Can anyone give me a hint?
My current code looks like this:
// Create Raster Geometry object
RasterGeometry = gm.CreateService("GeoMedia.RasterGeometry") as Intergraph.GeoMedia.PRaster.RasterGeometry;
RasterGeometry.Filename = m_RasterService.Filename;
RasterGeometry.DisplayMatrix = ViewMatrix;
ClientRecordset = null;
object dummy = null;
ConnID = GetWareHouseID(ref conns);
Database = conns.Item(ConnID).Database as Intergraph.GeoMedia.PClient.GDatabase;
ClientRecordset = Database.OpenRecordset("Select * from " + "EPSG_" + EPSG.ToString(), 2, dummy, dummy, dummy, "Geometrie");
RasterGeoStore = gm.CreateService("GeoMedia.GeometryStorageService") as Intergraph.GeoMedia.PClient.GeometryStorageService;
//RasterGeoStore.GeometryToStorage(RasterGeometry, out rasterChunk);
ClientRecordset.GFields["Beschreibung"].Value = LegName;
string PreLegName = string.Empty;
LegEntryFound(ref view, conns.Item(ConnID), ref LegName, "EPSG_" + EPSG.ToString());
ReloadLegendEntries(ref conns, ref ConnID);
appLogger.AppendDebugLog("Get InsertWMSImage Ende (OK)");
Solved! Go to Solution.
11-24-2020 12:52 AM
if this used to work in GM 2015 then it looks like a bug. You should create a support ticket in this case.
11-24-2020 05:15 AM
When you move from 15.0 software, past 16.0 / 16.1 / 16.2, past 16.5, and then to 16.6, you are jumping many releases and probably 5 calendar years. We definitely encourage this! But this normally involves more than just "updating the used dll's" - somewhat rarely there are breaking changes in API, more often there are environmental changes such as use of a newer version of Visual Studio and .net runtime, changes in our delivery structure, and so on. All such impacts are covered in the GeoMedia Object Reference (available from your Start menu). Look in the very first section entitled Overview -> Developer Impacts. That section covers changes that have accumulated since the 16.5 (2018) release.
I do not recall any change to GeometryStorageService specifically, that would create such issues. - Hal
12-11-2020 08:12 AM
i don't know if this is helpful. I had some Problems like this too, i changed the way i am creating objects from "createservice" to a simple "new". I'm using vb.net in visual studio 2017.
'Change Geometry in Recordset
mRs.GFields(sGFieldName) = Geometry2Blob(mGeometry)
'geometry to blob
Function Geometry2Blob(ByVal Geometry As Object) As Object
Dim vBlob As Object = Nothing
Dim mGss As New Intergraph.GeoMedia.PClient.GeometryStorageService
12-15-2020 06:12 AM
The problem could be solved. "Only" the appropriate environment variables had to be set. In a previous version, these were not necessary. Thanks for the help.
12-15-2020 06:42 AM
you are not quite right. The need for some GM folders in the PATH environment variable, (or using the registry AppPath mechanism on production systems) was always there. The location of the folders changed from time to time, but always was there at least since version 4, which is the oldest I remember. And it is well documented in the GeoMedia Object Reference.
Please update also the support ticket, so that we can close it.