I've just tried to deserialize an overlay that contains an isoline feature using the GeoSerializer. The following Argument Exception error was produced by the deserialize method (see attachment IsolineDeserializeError.png).
The Serialize method does not produce an error with this approach, but it takes forever. Subsequently, I've noticed that the isoline overlay produces very large files that are approximately 10 times the size of a file containing shape, feature and grid overlays. When I look at a save file and examine the Isoline Overlay, there are several hundred thousand (yes, ~400,000) ArrayItem tags. I believe this has something to do with the problem.
I don't get the same error anymore, but now when I deserialize an isoline layer from a serialized file, all the isolines appear simply as straight lines. Attached are two images before serializing and after deserializing.
Note that the underlying Data Grid is okay and that the serializer for that references the .grd file whereas the isoline layer seems to store all the values in the grid. Not sure if that's a great way to do it, but the data grids do seem to work okay.
We couldn’t 100% recreate this issue but we fixed a bug today which we think leads to your issue. Could you please try to get the latest Daily Build (5.5.119.0) and have another try?
Also here is our test code, (based on the Code Community Sample)
//Add the grid layer, the grid cells, and the well points to the map LayerOverlay isoLineOverlay = new LayerOverlay(); Layer layer = GetGridIsoLineLayer(); layer.Open(); isoLineOverlay.Layers.Add("IsoLineLayer", layer); isoLineOverlay.Layers.Add("GridCellsLayer", GetGridFeatureLayer()); isoLineOverlay.Layers.Add("WellsLayer", GetWellDepthPointLayer());
GeoSerializer serializer = new GeoSerializer(); serializer.Serialize(isoLineOverlay, "a.xml");
I haven't had any luck so far. Now I can't seem to get the isoline overlay to load properly at all. When I take the deserialized layer object and try to use the Close method followed by the Open method as I have done to refresh all other layers, I get an "Object reference not set to an instance of an object" error. The error occurs on the Open method. The funny part is that the intellisense still sees the object and also it's properties. Even stranger is that the Close method does not produce an error, but the itellisense shows the IsOpen property to be "true". See attached screen shot.
Can you send your data to us so we can have a shot here? We couldn’t recreate it in our sample and the IsOpen seems working fine on my side. What exact the version are you using by the way, 5.5.119.0?
Thank you very much for sending the data, which made us reproduce properly. Now the issue has been fixed, please get the latest version the 5.5.154.0 or higher and have a try.