本文整理汇总了C#中IMultiPoint类的典型用法代码示例。如果您正苦于以下问题:C# IMultiPoint类的具体用法?C# IMultiPoint怎么用?C# IMultiPoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IMultiPoint类属于命名空间,在下文中一共展示了IMultiPoint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GeometryToSqlGeometry
private static void GeometryToSqlGeometry(IMultiPoint geom, SqlGeometryBuilder bldr)
{
bldr.BeginGeometry(OpenGisGeometryType.MultiPoint);
for (int i = 0, c = geom.NumGeometries; i < c; i++)
GeometryToSqlGeometry(geom.Geometries[i] as IPoint, bldr);
bldr.EndGeometry();
}
示例2: IsSimple
/// <summary>
/// A MultiPoint is simple if it has no repeated points.
/// </summary>
public bool IsSimple(IMultiPoint mp)
{
if (mp.IsEmpty)
return true;
ISet points = new ListSet();
for (int i = 0; i < mp.NumGeometries; i++)
{
IPoint pt = (IPoint) mp.GetGeometryN(i);
ICoordinate p = pt.Coordinate;
if (points.Contains(p))
return false;
points.Add(p);
}
return true;
}
示例3: IsSimple
public bool IsSimple(IMultiPoint mp)
{
return IsSimpleMultiPoint(mp);
}
示例4: SetByteStream
/// <summary>
///
/// </summary>
/// <param name="geometry"></param>
/// <returns></returns>
protected virtual int SetByteStream(IMultiPoint geometry)
{
int count = INIT_COUNT;
count += 4; // NumPoints
foreach (Point geom in geometry.Geometries)
count += SetByteStream(geom);
return count;
}
示例5: Write
/// <summary>
///
/// </summary>
/// <param name="multiPoint"></param>
/// <param name="writer"></param>
protected virtual void Write(IMultiPoint multiPoint, BinaryWriter writer)
{
WriteByteOrder(writer);
writer.Write((int)WkbGeometryType.MultiPoint);
writer.Write(multiPoint.NumGeometries);
for (int i = 0; i < multiPoint.NumGeometries; i++)
Write(multiPoint.Geometries[i] as Point, writer);
}
示例6: CheckValid
/// <summary>
/// Checks validity of a MultiPoint.
/// </summary>
/// <param name="g"></param>
private void CheckValid(IMultiPoint g)
{
CheckInvalidCoordinates(g.Coordinates);
}
示例7: Write
/// <summary>
///
/// </summary>
/// <param name="multiPoint"></param>
/// <param name="writer"></param>
protected void Write(IMultiPoint multiPoint, BinaryWriter writer)
{
WriteByteOrder(writer); // LittleIndian
writer.Write((int) WKBGeometryTypes.WKBMultiPoint);
writer.Write((int) multiPoint.NumGeometries);
for (int i = 0; i < multiPoint.NumGeometries; i++)
Write(multiPoint.Geometries[i] as IPoint, writer);
}
示例8: SetByteStreamLength
/// <summary>
///
/// </summary>
/// <param name="multiPoint"></param>
/// <returns></returns>
protected int SetByteStreamLength(IMultiPoint multiPoint)
{
int numPoints = multiPoint.NumPoints;
return CalculateLength(numPoints);
}
示例9: SetByteStreamLength
/// <summary>
///
/// </summary>
/// <param name="multiPoint"></param>
/// <returns></returns>
protected int SetByteStreamLength(IMultiPoint multiPoint)
{
int count = InitValue;
foreach (IPoint p in multiPoint.Geometries)
count += SetByteStreamLength(p);
return count;
}
示例10: AppendMultiPointText
/// <summary>
/// Converts a <c>MultiPoint</c> to <MultiPoint Text format, then
/// appends it to the writer.
/// </summary>
/// <param name="multiPoint">The <c>MultiPoint</c> to process.</param>
/// <param name="level"></param>
/// <param name="writer">The output writer to append to.</param>
private void AppendMultiPointText(IMultiPoint multiPoint, int level, TextWriter writer)
{
if (multiPoint.IsEmpty)
writer.Write(" EMPTY");
else
{
writer.Write("(");
for (int i = 0; i < multiPoint.NumGeometries; i++)
{
if (i > 0) writer.Write(",");
AppendCoordinate(((IPoint) multiPoint.GetGeometryN(i)).Coordinate, writer, multiPoint.PrecisionModel);
}
writer.Write(")");
}
}
示例11: AppendMultiPointTaggedText
/// <summary>
/// Converts a <c>MultiPoint</c> to <MultiPoint Tagged Text
/// format, then appends it to the writer.
/// </summary>
/// <param name="multipoint">The <c>MultiPoint</c> to process.</param>
/// <param name="level"></param>
/// <param name="writer">The output writer to append to.</param>
private void AppendMultiPointTaggedText(IMultiPoint multipoint, int level, TextWriter writer)
{
writer.Write("MULTIPOINT");
AppendMultiPointText(multipoint, level, writer);
}
示例12: TransformMultiPoint
/// <summary>
///
/// </summary>
/// <param name="geom"></param>
/// <param name="parent"></param>
/// <returns></returns>
protected virtual IGeometry TransformMultiPoint(IMultiPoint geom, IGeometry parent)
{
ArrayList transGeomList = new ArrayList();
for (int i = 0; i < geom.NumGeometries; i++)
{
IGeometry transformGeom = TransformPoint((IPoint) geom.GetGeometryN(i), geom);
if (transformGeom == null) continue;
if (transformGeom.IsEmpty) continue;
transGeomList.Add(transformGeom);
}
return factory.BuildGeometry(transGeomList);
}
示例13: ToMultiPointArray
/// <summary>
/// Converts the <c>ICollection</c> to an array.
/// </summary>
/// <param name="multiPoints">The <c>ICollection</c> of MultiPoints to convert.</param>
/// <returns>The <c>ICollection</c> in array format.</returns>
public static IMultiPoint[] ToMultiPointArray(ICollection multiPoints)
{
IMultiPoint[] list = new IMultiPoint[multiPoints.Count];
int i = 0;
foreach (IMultiPoint mp in multiPoints)
list[i++] = mp;
return list;
}
示例14: FromMultiPoint
private static DSMultiPoint FromMultiPoint(IMultiPoint geometry, DSGeometryFactory factory, bool setUserData)
{
var result = factory.CreateMultiPoint(FromCoordinates(geometry.Coordinates));
if (setUserData)
result.UserData = geometry.UserData;
return result;
}
示例15: FromMultiPoint
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;
}