public static MultipointN FromCommon(IMultiPoint commonMultiPoint) { MultipointN agsMultiPoint = new MultipointN(); agsMultiPoint.PointArray = commonMultiPoint.Select(o => PointN.FromCommon(o)).Cast <Point>().ToArray(); return(agsMultiPoint); }
public static MultipointN FromCommon(IPoint commonPoint) { MultipointN agsMultiPoint = new MultipointN(); agsMultiPoint.PointArray = new Point[1]; agsMultiPoint.PointArray[0] = PointN.FromCommon(commonPoint); return(agsMultiPoint); }
public static Geometry FromCommon(IGeometry commonGeometry) { switch (commonGeometry.OgcGeometryType) { case OgcGeometryType.Point: return(PointN.FromCommon((IPoint)commonGeometry)); case OgcGeometryType.MultiPoint: return(MultipointN.FromCommon((IMultiPoint)commonGeometry)); case OgcGeometryType.LineString: return(PolylineN.FromCommon((ILineString)commonGeometry)); case OgcGeometryType.MultiLineString: return(PolylineN.FromCommon((IMultiLineString)commonGeometry)); case OgcGeometryType.Polygon: return(PolygonN.FromCommon((IPolygon)commonGeometry)); case OgcGeometryType.MultiPolygon: return(PolygonN.FromCommon((IMultiPolygon)commonGeometry)); default: throw new NotSupportedException("Conversion from an IGeometryCollection to an AppGeo.Ags.Geometry is not supported."); } }