ThinkGeo.com    |     Documentation    |     Premium Support

InMemoryGridIsoLineLayer error when IsoLineType = ClosedLinesAsPolygons

Hi

When I use InMemoryGridIsoLineLayer with IsoLineType = ClosedLinesAsPolygons:
new InMemoryGridIsoLineLayer(gridMatrix, isoLineLevels, double.MinValue, double.MaxValue, -999, IsoLineType.ClosedLinesAsPolygons)

  • subsequent call to layer.Draw I get an error:

System.TypeLoadException: ‘Method ‘Covers’ in type ‘GisSharpBlog.NetTopologySuite.Geometries.Envelope’ from assembly ‘NetTopologySuite, Version=1.7.3.31740, Culture=neutral, PublicKeyToken=f580a05016ebada1’ does not have an implementation.’

			    RectangleShape boundingBox = WebApiExtentHelper.GetBoundingBoxForXyz(x, y, z, GeographyUnit.Meter);

			LayerOverlay layerOverlay = new LayerOverlay();
			InMemoryGridIsoLineLayer isoLineLayer = GetGridIsoLineLayer(tileType, boundingBox, date);
			layerOverlay.Layers.Add(isoLineLayer);

			using (Bitmap bitmap = new Bitmap(256, 256))
			{
				GdiPlusGeoCanvas geoCanvas = new GdiPlusGeoCanvas();
				geoCanvas.BeginDrawing(bitmap, boundingBox, GeographyUnit.Meter);
				**layerOverlay.Draw(geoCanvas);**
				geoCanvas.EndDrawing();

				var ms = new MemoryStream();
				bitmap.Save(ms, ImageFormat.Png);
                            ......
			}

MapSuiteCore Version: 9.0.0.550 Language Neutral

It works fine with IsoLineType = LinesOnly.
It also works fine with MapSuiteCore Version: 8.0.0.351 Language Neutral - both IsoLineTypes.

Any suggestions on how to avoid this?

/Lars