/// <summary> /// Creates a new MultiPoint geometry from a MultiPoint shape /// </summary> /// <param name="shape">The shape to convert</param> /// <param name="factory">The geometry factory to use.</param> /// <param name="copyAttributes">A value indicating whether or not to copy the <see cref="Data.Shape.Attributes"/> to <see cref="GeoAPIGeometry.UserData"/></param> /// <returns>The geometry representing the converted shape.</returns> /// <returns></returns> private static GeoAPIGeometry FromMultiPointShape(Data.Shape shape, GeoAPIGeometryFactory factory, bool copyAttributes) { var coords = new List <GeoAPICoordinate>(); foreach (var part in shape.Range.Parts) { var i = part.StartIndex; foreach (var vertex in part) { var c = new GeoAPICoordinate(vertex.X, vertex.Y); coords.Add(c); //if (shape.HasM()) c.M = shape.M[i]; if (shape.HasZ()) { c.Z = shape.Z[i]; } i++; } } var ret = factory.CreateMultiPoint(coords.ToArray()); if (copyAttributes) { ret.UserData = shape.Attributes; } return(ret); }
private static GeoAPIMultiPoint FromMultiPoint(IMultiPoint geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var result = factory.CreateMultiPoint(FromCoordinates(geometry.Coordinates)); if (copyUserData) { result.UserData = geometry.UserData; } return(result); }
/* * private static DSCoordinateSequence FromCoordinateSequence(ICoordinateSequence coordinateSequence, DSCoordinateSequenceFactory factory) * { * var coordinates = FromCoordinates(coordinateSequence.ToCoordinateArray()); * return factory.Create(coordinates); * } */ private static GeoAPIPoint FromPoint(IPoint geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var coord = FromCoordinate(geometry.Coordinate); var point = factory.CreatePoint(coord); if (copyUserData) { point.UserData = geometry.UserData; } return(point); }
private static GeoAPIGeometry FromGeometry(IGeometry geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var point = geometry as IPoint; if (point != null) { return(FromPoint(point, factory, copyUserData)); } var lineString = geometry as ILineString; if (lineString != null) { return(FromLineString(lineString, factory, copyUserData)); } var polygon = geometry as IPolygon; if (polygon != null) { return(FromPolygon(polygon, factory, copyUserData)); } var multiPoint = geometry as IMultiPoint; if (multiPoint != null) { return(FromMultiPoint(multiPoint, factory, copyUserData)); } var multiLineString = geometry as IMultiLineString; if (multiLineString != null) { return(FromMultiLineString(multiLineString, factory, copyUserData)); } var multiPolygon = geometry as IMultiPolygon; if (multiPolygon != null) { return(FromMultiPolygon(multiPolygon, factory, copyUserData)); } var geometryCollection = geometry as IGeometryCollection; if (geometryCollection != null) { return(FromGeometryCollection(geometryCollection, factory, copyUserData)); } throw new ArgumentException(); }
private static GeoAPILineString FromLineString(ILineString geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var coordinates = FromCoordinates(geometry.Coordinates); var result = (geometry is ILinearRing) ? factory.CreateLinearRing(coordinates) : factory.CreateLineString(coordinates); if (copyUserData) { result.UserData = geometry.UserData; } return(result); }
private static GeoAPIPolygon FromPolygon(IPolygon geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var shell = (GeoAPILinearRing)FromLineString(geometry.Shell, factory, copyUserData); GeoAPILinearRing[] holes = null; if (geometry.Holes != null && geometry.Holes.Length > 0) { holes = new GeoAPILinearRing[geometry.Holes.Length]; for (var i = 0; i < holes.Length; i++) { holes[i] = (GeoAPILinearRing)FromLineString(geometry.Holes[i], factory, copyUserData); } } return(factory.CreatePolygon(shell, holes)); }
private static GeoAPIMultiPolygon FromMultiPolygon(IMultiPolygon geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var dsPolygons = new GeoAPI.Geometries.IPolygon[geometry.NumGeometries]; for (var i = 0; i < dsPolygons.Length; i++) { dsPolygons[i] = FromPolygon((IPolygon)geometry.GetGeometryN(i), factory, copyUserData); } var result = factory.CreateMultiPolygon(dsPolygons); if (copyUserData) { result.UserData = geometry.UserData; } return(result); }
/// <summary> /// Get the point for this shape if this is a point shape. /// </summary> /// <param name="shape">The shape to convert</param> /// <param name="factory">The geometry factory to use.</param> /// <param name="copyAttributes">A value indicating whether or not to copy the <see cref="Data.Shape.Attributes"/> to <see cref="GeoAPIGeometry.UserData"/></param> /// <returns>The geometry representing the converted shape.</returns> private static GeoAPIGeometry FromPointShape(Data.Shape shape, GeoAPIGeometryFactory factory, bool copyAttributes) { var part = shape.Range.Parts[0]; var i = part.StartIndex; var c = new GeoAPICoordinate(part.Vertices[0], part.Vertices[1]); //if (shape.HasM()) c.M = shape.M[i] if (shape.HasZ()) { c.Z = shape.Z[i]; } var ret = factory.CreatePoint(c); if (copyAttributes) { ret.UserData = shape.Attributes; } return(ret); }
/// <summary> /// Gets the line for the specified index /// </summary> /// <param name="shape">The shape to convert</param> /// <param name="factory">The geometry factory to use.</param> /// <param name="copyAttributes">A value indicating whether or not to copy the <see cref="Data.Shape.Attributes"/> to <see cref="GeoAPIGeometry.UserData"/></param> /// <returns>The geometry representing the converted shape.</returns> private static GeoAPIGeometry FromLineShape(Data.Shape shape, GeoAPIGeometryFactory factory, bool copyAttributes) { var lines = new List <GeoAPILineString>(); foreach (var part in shape.Range.Parts) { var i = part.StartIndex; var coords = new List <GeoAPICoordinate>(); foreach (var d in part) { var c = new GeoAPICoordinate(d.X, d.Y); coords.Add(c); //if (shape.HasM()) c.M = M[i]; if (shape.HasZ()) { c.Z = shape.Z[i]; } i++; } lines.Add(factory.CreateLineString(coords.ToArray())); } if (lines.Count == 1) { if (copyAttributes) { lines[0].UserData = shape.Attributes; } return(lines[0]); } var ret = factory.CreateMultiLineString(lines.ToArray()); if (copyAttributes) { ret.UserData = shape.Attributes; } return(ret); }
private static GeoAPIPolygon FromPolygon(IPolygon geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var shell = (GeoAPILinearRing)FromLineString(geometry.Shell, factory, copyUserData); GeoAPILinearRing[] holes = null; if (geometry.Holes != null && geometry.Holes.Length > 0) { holes = new GeoAPILinearRing[geometry.Holes.Length]; for (var i = 0; i < holes.Length; i++) holes[i] = (GeoAPILinearRing)FromLineString(geometry.Holes[i], factory, copyUserData); } return factory.CreatePolygon(shell, holes); }
private static GeoAPIMultiPoint FromMultiPoint(IMultiPoint geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var result = factory.CreateMultiPoint(FromCoordinates(geometry.Coordinates)); if (copyUserData) result.UserData = geometry.UserData; return result; }
/* private static DSCoordinateSequence FromCoordinateSequence(ICoordinateSequence coordinateSequence, DSCoordinateSequenceFactory factory) { var coordinates = FromCoordinates(coordinateSequence.ToCoordinateArray()); return factory.Create(coordinates); } */ private static GeoAPIPoint FromPoint(IPoint geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var coord = FromCoordinate(geometry.Coordinate); var point = factory.CreatePoint(coord); if (copyUserData) point.UserData = geometry.UserData; return point; }
private static GeoAPILineString FromLineString(ILineString geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var coordinates = FromCoordinates(geometry.Coordinates); var result = (geometry is ILinearRing) ? factory.CreateLinearRing(coordinates) : factory.CreateLineString(coordinates); if (copyUserData) result.UserData = geometry.UserData; return result; }
public static IList<GeoAPIGeometry> ToGeoAPI(this IList<IGeometry> geometries, GeoAPIGeometryFactory factory = null, bool setUserData = false) { return geometries.Select(geometry => FromGeometry(geometry, factory, setUserData)).ToList(); }
private static GeoAPIGeometry FromGeometry(IGeometry geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var point = geometry as IPoint; if (point != null) return FromPoint(point, factory, copyUserData); var lineString = geometry as ILineString; if (lineString != null) return FromLineString(lineString, factory, copyUserData); var polygon = geometry as IPolygon; if (polygon != null) return FromPolygon(polygon, factory, copyUserData); var multiPoint = geometry as IMultiPoint; if (multiPoint != null) return FromMultiPoint(multiPoint, factory, copyUserData); var multiLineString = geometry as IMultiLineString; if (multiLineString != null) return FromMultiLineString(multiLineString, factory, copyUserData); var multiPolygon = geometry as IMultiPolygon; if (multiPolygon != null) return FromMultiPolygon(multiPolygon, factory, copyUserData); var geometryCollection = geometry as IGeometryCollection; if (geometryCollection != null) return FromGeometryCollection(geometryCollection, factory, copyUserData); throw new ArgumentException(); }
/// <summary> /// Converts a <see cref="IGeometryCollection"/> to a <see cref="GeoAPIGeometryCollection"/> /// </summary> /// <param name="self">The <see cref="IGeometryCollection"/> to convert</param> /// <param name="factory">The factory to create the <see cref="GeoAPIGeometryCollection"/></param> /// <param name="setUserData">Sets the <see cref="GeoAPIGeometry.UserData"/> to <paramref name="self"/>.UserData</param> /// <returns>The converted geometry</returns> public static GeoAPIGeometryCollection ToGeoAPI(this IGeometryCollection self, GeoAPIGeometryFactory factory = null, bool setUserData = false) { var useFactory = factory ?? self.Factory.ToGeoAPI(); return(FromGeometryCollection(self, useFactory, setUserData)); }
/// <summary> /// Converts a <see cref="IGeometryCollection"/> to a <see cref="GeoAPIGeometryCollection"/> /// </summary> /// <param name="self">The <see cref="IGeometryCollection"/> to convert</param> /// <param name="factory">The factory to create the <see cref="GeoAPIGeometryCollection"/></param> /// <param name="setUserData">Sets the <see cref="GeoAPIGeometry.UserData"/> to <paramref name="self"/>.UserData</param> /// <returns>The converted geometry</returns> public static GeoAPIGeometryCollection ToGeoAPI(this IGeometryCollection self, GeoAPIGeometryFactory factory = null, bool setUserData = false) { var useFactory = factory ?? self.Factory.ToGeoAPI(); return FromGeometryCollection(self, useFactory, setUserData); }
/// <summary> /// Creates a new MultiPoint geometry from a MultiPoint shape /// </summary> /// <param name="shape">The shape to convert</param> /// <param name="factory">The geometry factory to use.</param> /// <param name="copyAttributes">A value indicating whether or not to copy the <see cref="Data.Shape.Attributes"/> to <see cref="GeoAPIGeometry.UserData"/></param> /// <returns>The geometry representing the converted shape.</returns> /// <returns></returns> private static GeoAPIGeometry FromMultiPointShape(Data.Shape shape, GeoAPIGeometryFactory factory, bool copyAttributes) { var coords = new List<GeoAPICoordinate>(); foreach (var part in shape.Range.Parts) { var i = part.StartIndex; foreach (var vertex in part) { var c = new GeoAPICoordinate(vertex.X, vertex.Y); coords.Add(c); //if (shape.HasM()) c.M = shape.M[i]; if (shape.HasZ()) c.Z = shape.Z[i]; i++; } } var ret = factory.CreateMultiPoint(coords.ToArray()); if (copyAttributes) ret.UserData = shape.Attributes; return ret; }
/// <summary> /// Creates a Polygon or MultiPolygon from this Polygon shape. /// </summary> /// <param name="shape">The shape to convert</param> /// <param name="factory">The geometry factory to use.</param> /// <param name="copyAttributes">A value indicating whether or not to copy the <see cref="Data.Shape.Attributes"/> to <see cref="GeoAPIGeometry.UserData"/></param> /// <returns>The geometry representing the converted shape.</returns> private static GeoAPIGeometry FromPolygonShape(Data.Shape shape, GeoAPIGeometryFactory factory, bool copyAttributes) { var shells = new List<GeoAPILinearRing>(); var holes = new List<GeoAPILinearRing>(); foreach (var part in shape.Range.Parts) { var coords = new List<GeoAPICoordinate>(); var i = part.StartIndex; foreach (var d in part) { var c = new GeoAPICoordinate(d.X, d.Y); //if (shape.HasM()) c.M = M[i]; if (shape.HasZ()) c.Z = shape.Z[i]; i++; coords.Add(c); } var ring = factory.CreateLinearRing(coords.ToArray()); if (shape.Range.Parts.Count == 1) { shells.Add(ring); } else { if (NetTopologySuite.Algorithm.CGAlgorithms.IsCCW(ring.Coordinates)) { holes.Add(ring); } else { shells.Add(ring); } } } //// Now we have a list of all shells and all holes var holesForShells = new List<GeoAPILinearRing>[shells.Count]; for (var i = 0; i < shells.Count; i++) { holesForShells[i] = new List<GeoAPILinearRing>(); } // Find holes foreach (var testRing in holes) { GeoAPILinearRing minShell = null; GeoAPIEnvelope minEnv = null; var testEnv = testRing.EnvelopeInternal; var testPt = testRing.Coordinates[0]; for (int j = 0; j < shells.Count; j++) { var tryRing = shells[j]; var tryEnv = tryRing.EnvelopeInternal; if (minShell != null) minEnv = minShell.EnvelopeInternal; var isContained = tryEnv.Contains(testEnv) && (NetTopologySuite.Algorithm.CGAlgorithms.IsPointInRing(testPt, tryRing.Coordinates) || (PointInList(testPt, tryRing.Coordinates))); // Check if this new containing ring is smaller than the current minimum ring if (isContained) { if (minShell == null || minEnv.Contains(tryEnv)) { minShell = tryRing; } holesForShells[j].Add(testRing); } } } var polygons = new GeoAPIPolygon[shells.Count]; for (var i = 0; i < shells.Count; i++) { polygons[i] = factory.CreatePolygon(shells[i], holesForShells[i].ToArray()); } if (polygons.Length == 1) { if (copyAttributes) polygons[0].UserData = shape.Attributes; return polygons[0]; } // It's a multi part var ret = factory.CreateMultiPolygon(polygons); if (copyAttributes) ret.UserData = shape.Attributes; return ret; }
private static GeoAPIGeometryCollection FromGeometryCollection(IGeometryCollection geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var dsGeometries = new GeoAPI.Geometries.IGeometry[geometry.NumGeometries]; for (var i = 0; i < dsGeometries.Length; i++) dsGeometries[i] = FromGeometry(geometry.GetGeometryN(i), factory, copyUserData); var result = factory.CreateGeometryCollection(dsGeometries); if (copyUserData) result.UserData = geometry.UserData; return result; }
private static GeoAPIMultiLineString FromMultiLineString(IMultiLineString geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var dsLineStrings = new GeoAPILineString[geometry.NumGeometries]; for (var i = 0; i < dsLineStrings.Length; i++) dsLineStrings[i] = FromLineString((ILineString)geometry.GetGeometryN(i), factory, copyUserData); var result = factory.CreateMultiLineString(dsLineStrings); if (copyUserData) result.UserData = geometry.UserData; return result; }
public static IList <GeoAPIGeometry> ToGeoAPI(this IList <IGeometry> geometries, GeoAPIGeometryFactory factory = null, bool setUserData = false) { return(geometries.Select(geometry => FromGeometry(geometry, factory, setUserData)).ToList()); }
private static GeoAPIGeometryCollection FromGeometryCollection(IGeometryCollection geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var dsGeometries = new GeoAPI.Geometries.IGeometry[geometry.NumGeometries]; for (var i = 0; i < dsGeometries.Length; i++) { dsGeometries[i] = FromGeometry(geometry.GetGeometryN(i), factory, copyUserData); } var result = factory.CreateGeometryCollection(dsGeometries); if (copyUserData) { result.UserData = geometry.UserData; } return(result); }
private static GeoAPIMultiLineString FromMultiLineString(IMultiLineString geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var dsLineStrings = new GeoAPILineString[geometry.NumGeometries]; for (var i = 0; i < dsLineStrings.Length; i++) { dsLineStrings[i] = FromLineString((ILineString)geometry.GetGeometryN(i), factory, copyUserData); } var result = factory.CreateMultiLineString(dsLineStrings); if (copyUserData) { result.UserData = geometry.UserData; } return(result); }
private static GeoAPIMultiPolygon FromMultiPolygon(IMultiPolygon geometry, GeoAPIGeometryFactory factory, bool copyUserData) { var dsPolygons = new GeoAPI.Geometries.IPolygon[geometry.NumGeometries]; for (var i = 0; i < dsPolygons.Length; i++) dsPolygons[i] = FromPolygon((IPolygon)geometry.GetGeometryN(i), factory, copyUserData); var result = factory.CreateMultiPolygon(dsPolygons); if (copyUserData) result.UserData = geometry.UserData; return result; }
/// <summary> /// Creates a Polygon or MultiPolygon from this Polygon shape. /// </summary> /// <param name="shape">The shape to convert</param> /// <param name="factory">The geometry factory to use.</param> /// <param name="copyAttributes">A value indicating whether or not to copy the <see cref="Data.Shape.Attributes"/> to <see cref="GeoAPIGeometry.UserData"/></param> /// <returns>The geometry representing the converted shape.</returns> private static GeoAPIGeometry FromPolygonShape(Data.Shape shape, GeoAPIGeometryFactory factory, bool copyAttributes) { var shells = new List <GeoAPILinearRing>(); var holes = new List <GeoAPILinearRing>(); foreach (var part in shape.Range.Parts) { var coords = new List <GeoAPICoordinate>(); var i = part.StartIndex; foreach (var d in part) { var c = new GeoAPICoordinate(d.X, d.Y); //if (shape.HasM()) c.M = M[i]; if (shape.HasZ()) { c.Z = shape.Z[i]; } i++; coords.Add(c); } var ring = factory.CreateLinearRing(coords.ToArray()); if (shape.Range.Parts.Count == 1) { shells.Add(ring); } else { if (NetTopologySuite.Algorithm.CGAlgorithms.IsCCW(ring.Coordinates)) { holes.Add(ring); } else { shells.Add(ring); } } } //// Now we have a list of all shells and all holes var holesForShells = new List <GeoAPILinearRing> [shells.Count]; for (var i = 0; i < shells.Count; i++) { holesForShells[i] = new List <GeoAPILinearRing>(); } // Find holes foreach (var testRing in holes) { GeoAPILinearRing minShell = null; GeoAPIEnvelope minEnv = null; var testEnv = testRing.EnvelopeInternal; var testPt = testRing.Coordinates[0]; for (int j = 0; j < shells.Count; j++) { var tryRing = shells[j]; var tryEnv = tryRing.EnvelopeInternal; if (minShell != null) { minEnv = minShell.EnvelopeInternal; } var isContained = tryEnv.Contains(testEnv) && (NetTopologySuite.Algorithm.CGAlgorithms.IsPointInRing(testPt, tryRing.Coordinates) || (PointInList(testPt, tryRing.Coordinates))); // Check if this new containing ring is smaller than the current minimum ring if (isContained) { if (minShell == null || minEnv.Contains(tryEnv)) { minShell = tryRing; } holesForShells[j].Add(testRing); } } } var polygons = new GeoAPIPolygon[shells.Count]; for (var i = 0; i < shells.Count; i++) { polygons[i] = factory.CreatePolygon(shells[i], holesForShells[i].ToArray()); } if (polygons.Length == 1) { if (copyAttributes) { polygons[0].UserData = shape.Attributes; } return(polygons[0]); } // It's a multi part var ret = factory.CreateMultiPolygon(polygons); if (copyAttributes) { ret.UserData = shape.Attributes; } return(ret); }
/// <summary> /// Get the point for this shape if this is a point shape. /// </summary> /// <param name="shape">The shape to convert</param> /// <param name="factory">The geometry factory to use.</param> /// <param name="copyAttributes">A value indicating whether or not to copy the <see cref="Data.Shape.Attributes"/> to <see cref="GeoAPIGeometry.UserData"/></param> /// <returns>The geometry representing the converted shape.</returns> private static GeoAPIGeometry FromPointShape(Data.Shape shape, GeoAPIGeometryFactory factory, bool copyAttributes) { var part = shape.Range.Parts[0]; var i = part.StartIndex; var c = new GeoAPICoordinate(part.Vertices[0], part.Vertices[1]); //if (shape.HasM()) c.M = shape.M[i] if (shape.HasZ()) c.Z = shape.Z[i]; var ret = factory.CreatePoint(c); if (copyAttributes) ret.UserData = shape.Attributes; return ret; }
/// <summary> /// Converts a <see cref="IPoint"/> to a <see cref="GeoAPIPoint"/> /// </summary> /// <param name="self">The <see cref="IPoint"/> to convert</param> /// <param name="factory">The factory to create the <see cref="GeoAPIPoint"/></param> /// <param name="setUserData">Sets the <see cref="GeoAPIGeometry.UserData"/> to <paramref name="self"/>.UserData</param> /// <returns>The converted geometry</returns> public static GeoAPIPoint ToGeoAPI(this IPoint self, GeoAPIGeometryFactory factory = null, bool setUserData = false) { var useFactory = factory ?? self.Factory.ToGeoAPI(); return(FromPoint(self, useFactory, setUserData)); }
/// <summary> /// Gets the line for the specified index /// </summary> /// <param name="shape">The shape to convert</param> /// <param name="factory">The geometry factory to use.</param> /// <param name="copyAttributes">A value indicating whether or not to copy the <see cref="Data.Shape.Attributes"/> to <see cref="GeoAPIGeometry.UserData"/></param> /// <returns>The geometry representing the converted shape.</returns> private static GeoAPIGeometry FromLineShape(Data.Shape shape, GeoAPIGeometryFactory factory, bool copyAttributes) { var lines = new List<GeoAPILineString>(); foreach (var part in shape.Range.Parts) { var i = part.StartIndex; var coords = new List<GeoAPICoordinate>(); foreach (var d in part) { var c = new GeoAPICoordinate(d.X, d.Y); coords.Add(c); //if (shape.HasM()) c.M = M[i]; if (shape.HasZ()) c.Z = shape.Z[i]; i++; } lines.Add(factory.CreateLineString(coords.ToArray())); } if (lines.Count == 1) { if (copyAttributes) lines[0].UserData = shape.Attributes; return lines[0]; } var ret = factory.CreateMultiLineString(lines.ToArray()); if (copyAttributes) ret.UserData = shape.Attributes; return ret; }
/// <summary> /// Converts a <see cref="IMultiLineString"/> to a <see cref="GeoAPIMultiLineString"/> /// </summary> /// <param name="self">The <see cref="IMultiLineString"/> to convert</param> /// <param name="factory">The factory to create the <see cref="GeoAPIMultiLineString"/></param> /// <param name="setUserData">Sets the <see cref="GeoAPIGeometry.UserData"/> to <paramref name="self"/>.UserData</param> /// <returns>The converted geometry</returns> public static GeoAPIMultiLineString ToGeoAPI(this IMultiLineString self, GeoAPIGeometryFactory factory = null, bool setUserData = false) { var useFactory = factory ?? self.Factory.ToGeoAPI(); return FromMultiLineString(self, useFactory, setUserData); }
/// <summary> /// Converts a <see cref="IPoint"/> to a <see cref="GeoAPIPoint"/> /// </summary> /// <param name="self">The <see cref="IPoint"/> to convert</param> /// <param name="factory">The factory to create the <see cref="GeoAPIPoint"/></param> /// <param name="setUserData">Sets the <see cref="GeoAPIGeometry.UserData"/> to <paramref name="self"/>.UserData</param> /// <returns>The converted geometry</returns> public static GeoAPIPoint ToGeoAPI(this IPoint self, GeoAPIGeometryFactory factory = null, bool setUserData = false) { var useFactory = factory ?? self.Factory.ToGeoAPI(); return FromPoint(self, useFactory, setUserData); }
/// <summary> /// Converts a <see cref="IMultiLineString"/> to a <see cref="GeoAPIMultiLineString"/> /// </summary> /// <param name="self">The <see cref="IMultiLineString"/> to convert</param> /// <param name="factory">The factory to create the <see cref="GeoAPIMultiLineString"/></param> /// <param name="setUserData">Sets the <see cref="GeoAPIGeometry.UserData"/> to <paramref name="self"/>.UserData</param> /// <returns>The converted geometry</returns> public static GeoAPIMultiLineString ToGeoAPI(this IMultiLineString self, GeoAPIGeometryFactory factory = null, bool setUserData = false) { var useFactory = factory ?? self.Factory.ToGeoAPI(); return(FromMultiLineString(self, useFactory, setUserData)); }