RotationProjectionConverter¶
Namespace: ThinkGeo.Core
This projection allows you to rotate the map image base don an angle.
public class RotationProjectionConverter : ProjectionConverter
Inheritance Object → ProjectionConverter → RotationProjectionConverter
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¶
InternalProjectionUnit¶
public GeographyUnit InternalProjectionUnit { get; }
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¶
Constructors¶
RotationProjectionConverter()¶
This is a constructor for the class.
public RotationProjectionConverter()
Remarks:
This is the default constructor and will set the angle to 0 whick is north being up.
RotationProjectionConverter(Double)¶
This is a constructor for the class.
public RotationProjectionConverter(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.
RotationProjectionConverter(GeographyUnit)¶
public RotationProjectionConverter(GeographyUnit sourceUnit)
Parameters¶
sourceUnit
GeographyUnit
RotationProjectionConverter(Double, GeographyUnit)¶
public RotationProjectionConverter(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.
OpenCore()¶
protected void OpenCore()
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>
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>)¶
This method returns a de-projected vertices based on the coordinates passed in.
protected Collection<Vertex> ConvertToInternalProjectionCore(IEnumerable<Vertex> verticies)
Parameters¶
verticies
IEnumerable<Vertex>
Returns¶
This method returns a de-projected vertices based on the coordinates passed
in.
Remarks:
This method returns a de-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. The de-projection is important because inside of the FeatureSource you will in many cases to to and from various projections.