Search Results for

    Show / Hide Table of Contents

    Class GeometricShapeFactory

    Computes various kinds of common geometric shapes. Allows various ways of specifying the location and extent of the shapes, as well as number of line segments used to form them.

    Inheritance
    object
    GeometricShapeFactory
    SineStarFactory
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Utilities
    Assembly: NetTopologySuite.dll
    Syntax
    public class GeometricShapeFactory

    Constructors

    | Edit this page View Source

    GeometricShapeFactory()

    Create a shape factory which will create shapes using the default GeometryFactory.

    Declaration
    public GeometricShapeFactory()
    | Edit this page View Source

    GeometricShapeFactory(GeometryFactory)

    Create a shape factory which will create shapes using the given GeometryFactory.

    Declaration
    public GeometricShapeFactory(GeometryFactory geomFact)
    Parameters
    Type Name Description
    GeometryFactory geomFact

    The factory to use.

    Fields

    | Edit this page View Source

    GeomFact

    A geometry factory

    Declaration
    protected GeometryFactory GeomFact
    Field Value
    Type Description
    GeometryFactory
    | Edit this page View Source

    PrecModel

    A precision model

    Declaration
    protected PrecisionModel PrecModel
    Field Value
    Type Description
    PrecisionModel

    Properties

    | Edit this page View Source

    Base

    Gets/Sets the location of the shape by specifying the base coordinate (which in most cases is the lower left point of the envelope containing the shape).

    Declaration
    public Coordinate Base { set; }
    Property Value
    Type Description
    Coordinate
    | Edit this page View Source

    Centre

    Gets/Sets the location of the shape by specifying the centre of the shape's bounding box.

    Declaration
    public Coordinate Centre { set; }
    Property Value
    Type Description
    Coordinate
    | Edit this page View Source

    Envelope

    Gets or sets the envelope of the shape

    Declaration
    public Envelope Envelope { get; set; }
    Property Value
    Type Description
    Envelope
    | Edit this page View Source

    Height

    Gets/Sets the height of the shape.

    Declaration
    public double Height { get; set; }
    Property Value
    Type Description
    double
    | Edit this page View Source

    NumPoints

    Gets/Sets the total number of points in the created Geometry.

    Declaration
    public int NumPoints { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Rotation

    Gets/Sets the rotation angle, in radians, to use for the shape. The rotation is applied relative to the centre of the shape.

    Declaration
    public double Rotation { get; set; }
    Property Value
    Type Description
    double
    | Edit this page View Source

    Size

    Gets/Sets the size of the extent of the shape in both x and y directions.

    Declaration
    public double Size { set; }
    Property Value
    Type Description
    double
    | Edit this page View Source

    Width

    Gets/Sets the width of the shape.

    Declaration
    public double Width { get; set; }
    Property Value
    Type Description
    double

    Methods

    | Edit this page View Source

    CreateArc(double, double)

    Creates a elliptical arc, as a LineString.

    Declaration
    public LineString CreateArc(double startAng, double angExtent)
    Parameters
    Type Name Description
    double startAng

    Start angle in radians

    double angExtent

    Size of angle in radians

    Returns
    Type Description
    LineString
    Remarks

    The arc is always created in a counter-clockwise direction.

    | Edit this page View Source

    CreateArcPolygon(double, double)

    Creates an elliptical arc polygon.

    Declaration
    public Polygon CreateArcPolygon(double startAng, double angExtent)
    Parameters
    Type Name Description
    double startAng

    Start angle in radians

    double angExtent

    Size of angle in radians

    Returns
    Type Description
    Polygon

    An elliptical arc polygon

    Remarks

    The polygon is formed from the specified arc of an ellipse and the two radii connecting the endpoints to the centre of the ellipse.

    | Edit this page View Source

    CreateCircle()

    Creates a circular Polygon.

    Declaration
    public Polygon CreateCircle()
    Returns
    Type Description
    Polygon

    A circular polygon.

    | Edit this page View Source

    CreateCoord(double, double)

    Creates a coordinate at (x, y)

    Declaration
    protected Coordinate CreateCoord(double x, double y)
    Parameters
    Type Name Description
    double x

    The x-ordinate value

    double y

    The y-ordinate value

    Returns
    Type Description
    Coordinate

    A coordinate

    | Edit this page View Source

    CreateCoordTrans(double, double, Coordinate)

    Creates a translated coordinate at (x + trans.X.X, y + trans.Y.Y)

    Declaration
    protected Coordinate CreateCoordTrans(double x, double y, Coordinate trans)
    Parameters
    Type Name Description
    double x

    The x-ordinate value

    double y

    The y-ordinate value

    Coordinate trans

    A translation vector (coordinate)

    Returns
    Type Description
    Coordinate

    A coordinate

    | Edit this page View Source

    CreateEllipse()

    Creates an elliptical Polygon. If the supplied envelope is square the result will be a circle.

    Declaration
    public Polygon CreateEllipse()
    Returns
    Type Description
    Polygon

    An an ellipse or circle.

    | Edit this page View Source

    CreateRectangle()

    Creates a rectangular Polygon.

    Declaration
    public Polygon CreateRectangle()
    Returns
    Type Description
    Polygon

    A rectangular polygon.

    | Edit this page View Source

    CreateSquircle()

    Creates a squircular Polygon.

    Declaration
    public Polygon CreateSquircle()
    Returns
    Type Description
    Polygon

    a squircle

    | Edit this page View Source

    CreateSupercircle(double)

    Creates a supercircular Polygon of a given positive power.

    Declaration
    public Polygon CreateSupercircle(double power)
    Parameters
    Type Name Description
    double power
    Returns
    Type Description
    Polygon

    a supercircle

    | Edit this page View Source

    Rotate(Geometry)

    Rotates a geometry by Rotation angle

    Declaration
    protected Geometry Rotate(Geometry geom)
    Parameters
    Type Name Description
    Geometry geom

    The geometry to rotate

    Returns
    Type Description
    Geometry

    A rotated geometry

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX