Crs.ProjectTo Methods
Reprojects the specified points to a new Crs.
Overload List
Name | Description | |
---|---|---|
Public method | ProjectTo(Crs crs, PointCollection points) | Reprojects the specified points to a new Crs. |
Public method | ProjectTo(Crs crs, RectangleSet area) | Reprojects a set of rectangles to a new Crs. |
Public method | ProjectTo(Crs crs, Rectangle rect) | Reprojects a rectangle to a new Crs. |
Public method | ProjectTo(Crs crs, Point point) | Reprojects the specified point to a new Crs. |
Public method | ProjectTo(Crs crs, IEnumerable< Point > points) | Reprojects the specified points to a new Crs. |
ProjectTo(Crs crs, PointCollection points)
Reprojects the specified points to a new Crs.Syntax
public PointCollection ProjectTo (
Crs crs,
PointCollection points
)
Parameters
The coordinate reference system to reproject the points to.
A collection of points to reproject.
Return Value
The points that result when points have been reprojected from the current Crs to crs.
ProjectTo(Crs crs, RectangleSet area)
Reprojects a set of rectangles to a new Crs.Syntax
public RectangleSet ProjectTo (
Crs crs,
RectangleSet area
)
Parameters
A new Crs.
A set of rectangles, expressed in the calling Crs.
Return Value
The set of rectangles expressed in the new Crs.
ProjectTo(Crs crs, Rectangle rect)
Reprojects a rectangle to a new Crs.Syntax
public RectangleSet ProjectTo (
Crs crs,
Rectangle rect
)
Parameters
A new Crs.
A rectangle in this (old) Crs.
Return Value
One or two rectangles in the new Crs that cover the original one.
Remarks
This method reprojects a rectangle from this (old) coordinate reference system to the new one. The result is a set of one or two rectangles that cover the original one (they are not necessarily the smallest ones that do so).
![]() |
In the example above, the map uses a Crs based on a LambertConformalConicProjection projection, with a central longitude at -165°. The brown rectangle, which is defined in the same Crs, crosses the international date line without problems, since the Crs has no discontinuity there. However, when the brown rectangle is reprojected to a Crs based on LongLat, it is impossible to give the result as a single LongLat rectangle with normalized longitudes. The southwest corner would need a longitude around 172°, and the northeast corner would need a longitude around -146°, but since 172 is greater than -146, this would not be a well-formed rectangle. Instead, the result of ProjectTo will consist of two LongLat rectangles, which are shown in purple and green.
This splitting behavior is designed for the case where the original rectangle is expressed in the View.Crs, and we want to know what areas, expressed in a DataSet.Crs, that should be queried for features. (This is done automatically when Carmenta Engine updates a View, so you seldom need to call this method from an application.)
Suppose we already have some features and want to zoom to an area that covers them. In this case, the splitting behavior is not desired, and it is better to use the method View.AreaForFeature or View.AreaForFeatures.
ProjectTo(Crs crs, Point point)
Reprojects the specified point to a new Crs.Syntax
public Point ProjectTo (
Crs crs,
Point point
)
Parameters
The coordinate reference system to reproject the point to.
A point to reproject.
Return Value
ProjectTo(Crs crs, IEnumerable< Point > points)
Reprojects the specified points to a new Crs.Syntax
public PointCollection ProjectTo (
Crs crs,
IEnumerable< Point > points
)
Parameters
The coordinate reference system to reproject the points to.
A collection of points to reproject.
Return Value
The points that result when points have been reprojected from the current Crs to crs.
Platforms
Windows, Linux, Android