Show / Hide Table of Contents

Class GeoPolygon

Handling of a geographical polygon defined by a series of GeoCoordinate

Inheritance
System.Object
GeoMapElement
GeoPolygon
Implements
IGeoMapElement
Inherited Members
GeoMapElement.UniqueId
GeoMapElement.Color
GeoMapElement.Thickness
GeoMapElement.Name
GeoMapElement.Description
GeoMapElement.DataList
GeoMapElement.AddDataList(String, String)
GeoMapElement.Draw()
Namespace: FpAssistantCore.Geographical
Assembly: FpAssistantCoreScl.dll
Syntax
public class GeoPolygon : GeoMapElement, IGeoMapElement
Remarks

A polygon must have 3 or more points to defined a closed shape

Constructors

View Source

GeoPolygon(GeoCoordinateElevation, GeoCoordinateElevation, GeoCoordinateElevation, MapObjectProperties)

Construct a GeoPolygon with three GeoCoordinate values

Declaration
public GeoPolygon(GeoCoordinateElevation coordinate1, GeoCoordinateElevation coordinate2, GeoCoordinateElevation coordinate3, MapObjectProperties mapObjectProperties)
Parameters
Type Name Description
GeoCoordinateElevation coordinate1

First coordinate with elevation

GeoCoordinateElevation coordinate2

Second coordinate with elevation

GeoCoordinateElevation coordinate3

Third coordinate with elevation

MapObjectProperties mapObjectProperties

Default values of map element properties, NULL can be passed

View Source

GeoPolygon(GeoCoordinateElevation, GeoCoordinateElevation, GeoCoordinateElevation, GeoCoordinateElevation, MapObjectProperties)

Construct a GeoPolygon with four GeoCoordinate values

Declaration
public GeoPolygon(GeoCoordinateElevation coordinate1, GeoCoordinateElevation coordinate2, GeoCoordinateElevation coordinate3, GeoCoordinateElevation coordinate4, MapObjectProperties mapObjectProperties)
Parameters
Type Name Description
GeoCoordinateElevation coordinate1

First coordinate with elevation

GeoCoordinateElevation coordinate2

Second coordinate with elevation

GeoCoordinateElevation coordinate3

Third coordinate with elevation

GeoCoordinateElevation coordinate4

Fourth coordinate with elevation

MapObjectProperties mapObjectProperties

Default values of map element properties, NULL can be passed

View Source

GeoPolygon(GeoCoordinateElevation, GeoCoordinateElevation, GeoCoordinateElevation, GeoCoordinateElevation, GeoCoordinateElevation, MapObjectProperties)

Construct a GeoPolygon with five GeoCoordinate values

Declaration
public GeoPolygon(GeoCoordinateElevation coordinate1, GeoCoordinateElevation coordinate2, GeoCoordinateElevation coordinate3, GeoCoordinateElevation coordinate4, GeoCoordinateElevation coordinate5, MapObjectProperties mapObjectProperties)
Parameters
Type Name Description
GeoCoordinateElevation coordinate1

First coordinate with elevation

GeoCoordinateElevation coordinate2

Second coordinate with elevation

GeoCoordinateElevation coordinate3

Third coordinate with elevation

GeoCoordinateElevation coordinate4

Fourth coordinate with elevation

GeoCoordinateElevation coordinate5

Fifth coordinate with elevation

MapObjectProperties mapObjectProperties

Default values of map element properties, NULL can be passed

View Source

GeoPolygon(GeoCoordinateElevationCollection)

Construct a GeoPolygon with a list of GeoCoordinateElevation values GeoCoordinateElevation

Declaration
public GeoPolygon(GeoCoordinateElevationCollection coordinates)
Parameters
Type Name Description
GeoCoordinateElevationCollection coordinates

List of coordinates with elevations to use

View Source

GeoPolygon(GeoCoordinateElevationCollection, MapObjectProperties)

Construct a GeoPolygon with a list of GeoCoordinateElevation values GeoCoordinateElevation

Declaration
public GeoPolygon(GeoCoordinateElevationCollection coordinates, MapObjectProperties mapObjectProperties)
Parameters
Type Name Description
GeoCoordinateElevationCollection coordinates

List of coordinates with elevations to use

MapObjectProperties mapObjectProperties

Default values of map element properties, NULL can be passed

Properties

View Source

Coordinates

Contains a list of the coordinates (with elevation) that define a polygon boundary

Declaration
public GeoCoordinateElevationCollection Coordinates { get; set; }
Property Value
Type Description
GeoCoordinateElevationCollection

List of coordinate with elevationsGeoCoordinateElevation

View Source

FillColour

Colour used to fill the polygon region

Declaration
public FpaColour FillColour { get; set; }
Property Value
Type Description
FpaColour

Methods

View Source

AsGeography(IFormatProvider)

Creates a geography type POLYGON()

Declaration
public string AsGeography(IFormatProvider provider)
Parameters
Type Name Description
IFormatProvider provider

Globalization culture to be applied to numbers

Returns
Type Description
System.String

String of the geography

Remarks

POLYGON - Needs to be closed (first and last coordinate the same) and have a minimum of 4 points / It should follow the "left hand/foot rule" (areas lying to the left-hand side of the line drawn between the points are considered to be inside the Polygon) / This is a 2D only 3D values will not be used

View Source

AsGmlPosList(GmlDimension, IFormatProvider)

Creates a value for GML posList element

Declaration
public string AsGmlPosList(GmlDimension gmlDimension, IFormatProvider provider)
Parameters
Type Name Description
GmlDimension gmlDimension

Determine if the GML output is required to be 2D or 3D coordinate values

IFormatProvider provider

Globalization culture to be applied to numbers

Returns
Type Description
System.String

String of the GML PosList element value

Remarks

As Z value will be converted to Metres

View Source

AssignProperties(MapObjectProperties)

Assign object mapping properties to map element: GeoPolygon

Declaration
public override void AssignProperties(MapObjectProperties mapObjectProperties)
Parameters
Type Name Description
MapObjectProperties mapObjectProperties
Overrides
GeoMapElement.AssignProperties(MapObjectProperties)
Remarks

Overrides from virtual function in base class GeoMapElement

Implements

IGeoMapElement
  • View Source
In This Article
Back to top Copyright 2018-2024 CADology Limited