RotationProjection¶
Namespace: ThinkGeo.Core
This projection allows you to rotate the map image base don an angle.
public class RotationProjection : ProjectionConverter
Inheritance Object → ProjectionConverter → RotationProjection
Remarks:
This can be usefully when you are working with directional maps such as driving maps where you want the upper center of the map to be in line with the direction of the vehicle heading.
Properties¶
Angle¶
This property sets the angle of rotation.
public double Angle { get; set; }
Property Value¶
SourceUnit¶
public GeographyUnit SourceUnit { get; set; }
Property Value¶
PivotCenter¶
public PointShape PivotCenter { get; set; }
Property Value¶
DecimalDegreeBoundary¶
public RectangleShape DecimalDegreeBoundary { get; set; }
Property Value¶
InternalProjection¶
Gets or sets the Proj4 text parameter for the from projection. This parameter typically look like "+Proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs".
public Projection InternalProjection { get; set; }
Property Value¶
ExternalProjection¶
Gets or sets the Proj4 text parameter for the to projection. This parameter typically look like "+proj=utm +zone=33 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs".
public Projection ExternalProjection { get; set; }
Property Value¶
IsOpen¶
This property gets the state of the projection (whether it is opened or closed).
public bool IsOpen { get; protected set; }
Property Value¶
Remarks:
This method will reflect whether the projection is opened or closed. It is set in the concrete methods Open and Close, so if you inherit from this class and override OpenCore or CloseCore, you will not need to be concerned with setting this property.
CanConvertRasterToExternalProjection¶
public bool CanConvertRasterToExternalProjection { get; protected set; }
Property Value¶
InternalProjectionUnit¶
public GeographyUnit InternalProjectionUnit { get; }
Property Value¶
Constructors¶
RotationProjection()¶
This is a constructor for the class.
public RotationProjection()
Remarks:
This is the default constructor and will set the angle to 0 whick is north being up.
RotationProjection(Double)¶
This is a constructor for the class.
public RotationProjection(double angle)
Parameters¶
angle
Double
This parameter is the angle you want to map to rotate to.
Remarks:
This constructor allows you to pass in an angle to change the rotation of the map.
RotationProjection(GeographyUnit)¶
public RotationProjection(GeographyUnit sourceUnit)
Parameters¶
sourceUnit
GeographyUnit
RotationProjection(Double, GeographyUnit)¶
public RotationProjection(double angle, GeographyUnit sourceUnit)
Parameters¶
angle
Double
sourceUnit
GeographyUnit
Methods¶
GetUpdatedExtent(RectangleShape)¶
This method returns an adjusted extend based on the angle of rotation.
public RectangleShape GetUpdatedExtent(RectangleShape worldExtent)
Parameters¶
worldExtent
RectangleShape
This parameter is the world extent before the rotation.
Returns¶
RectangleShape
This method returns an adjusted extend based on the angle of rotation.
Remarks:
This method returns an adjusted extend based on the angle of rotation. It is important that you update your current extent every time you adjust the angle of the projection. This will ensure the rotaion is performed properly.
ConvertToExternalProjectionCore(IEnumerable<Vertex>)¶
This method returns a projected vertices based on the coordinates passed in.
protected Collection<Vertex> ConvertToExternalProjectionCore(IEnumerable<Vertex> verticies)
Parameters¶
verticies
IEnumerable<Vertex>
This parameter is the verticies of the points that will be projected
Returns¶
This method returns a projected vertices based on the coordinates passed
in.
Remarks:
This method returns a projected vertex based on the coordinates passed in. You will need to override this method for the Projection class. Typically you can call the projection utility library that has interfaces for dozens of different types of projections.
ConvertToInternalProjectionCore(IEnumerable<Vertex>)¶
protected Collection<Vertex> ConvertToInternalProjectionCore(IEnumerable<Vertex> verticies)
Parameters¶
verticies
IEnumerable<Vertex>