Class GeometryFactoryEx
- Namespace
- NetTopologySuite.Geometries
- Assembly
- NetTopologySuite.dll
An extended GeometryFactory that is capable of enforcing a ring orientation for polygons.
public class GeometryFactoryEx : GeometryFactory
- Inheritance
-
GeometryFactoryEx
- Inherited Members
Constructors
GeometryFactoryEx()
Constructs a GeometryFactory that generates Geometries having a floating PrecisionModel and a spatial-reference ID of 0.
public GeometryFactoryEx()
GeometryFactoryEx(CoordinateSequenceFactory)
Constructs a GeometryFactory that generates Geometries having the given CoordinateSequence implementation, a double-precision floating PrecisionModel and a spatial-reference ID of 0.
public GeometryFactoryEx(CoordinateSequenceFactory coordinateSequenceFactory)
Parameters
coordinateSequenceFactory
CoordinateSequenceFactory
GeometryFactoryEx(PrecisionModel)
Constructs a GeometryFactory that generates Geometries having the given {PrecisionModel} and the default CoordinateSequence implementation.
public GeometryFactoryEx(PrecisionModel precisionModel)
Parameters
precisionModel
PrecisionModelThe PrecisionModel to use.
GeometryFactoryEx(PrecisionModel, int)
Constructs a GeometryFactory that generates Geometries having the given
PrecisionModel
and spatial-reference ID, and the default CoordinateSequence
implementation.
public GeometryFactoryEx(PrecisionModel precisionModel, int srid)
Parameters
precisionModel
PrecisionModelThe PrecisionModel to use.
srid
intThe SRID to use.
GeometryFactoryEx(PrecisionModel, int, CoordinateSequenceFactory)
Constructs a GeometryFactory that generates Geometries having the given PrecisionModel, spatial-reference ID, and CoordinateSequence implementation.
public GeometryFactoryEx(PrecisionModel precisionModel, int srid, CoordinateSequenceFactory coordinateSequenceFactory)
Parameters
precisionModel
PrecisionModelsrid
intcoordinateSequenceFactory
CoordinateSequenceFactory
GeometryFactoryEx(PrecisionModel, int, CoordinateSequenceFactory, NtsGeometryServices)
Constructs a GeometryFactory that generates Geometries having the given PrecisionModel, spatial-reference ID, and CoordinateSequence implementation.
public GeometryFactoryEx(PrecisionModel precisionModel, int srid, CoordinateSequenceFactory coordinateSequenceFactory, NtsGeometryServices services)
Parameters
precisionModel
PrecisionModelsrid
intcoordinateSequenceFactory
CoordinateSequenceFactoryservices
NtsGeometryServices
Properties
DefaultCoordinateSequenceFactory
Gets or sets the default coordinate sequence factory to use with these geometry factories
public static CoordinateSequenceFactory DefaultCoordinateSequenceFactory { get; set; }
Property Value
DefaultPrecisionModel
Gets or sets the default precision model to use with these geometry factories
public static PrecisionModel DefaultPrecisionModel { get; set; }
Property Value
DefaultSRID
Gets or sets the default spatial reference id.
public static int DefaultSRID { get; set; }
Property Value
OrientationOfExteriorRing
Gets or sets a value indicating the ring orientation of the
Polygon
's exterior rings.
If its value is DontCare, this factory behaves just like the base GeometryFactory.
public LinearRingOrientation OrientationOfExteriorRing { get; set; }
Property Value
Remarks
The setter of this property has to be used prior to any call
to CreatePolygon
, CreateMultiPolygon
, or
ReplaceSRID
- See Also
Methods
CreateMultiPolygon(Polygon[])
Creates a MultiPolygon
using the given Polygons
; a null or empty array
will create an empty Polygon. The polygons must conform to the
assertions specified in the http://www.opengis.org/techno/specs.htm OpenGIS Simple Features
Specification for SQL.
public override MultiPolygon CreateMultiPolygon(Polygon[] polygons)
Parameters
polygons
Polygon[]Polygons, each of which may be empty but not null.
Returns
- MultiPolygon
A MultiPolygon object
CreatePolygon(LinearRing, LinearRing[])
Constructs a Polygon
with the given exterior boundary and
interior boundaries.
public override Polygon CreatePolygon(LinearRing shell, LinearRing[] holes)
Parameters
shell
LinearRingThe outer boundary of the new
Polygon
, ornull
or an emptyLinearRing
if the empty point is to be created.holes
LinearRing[]The inner boundaries of the new
Polygon
, ornull
or emptyLinearRing
s if the empty point is to be created.
Returns
WithSRID(int)
public override GeometryFactory WithSRID(int srid)
Parameters
srid
int