Abstract base class for IMapProjectionFactory implementations.
abstract class
|
MapProjectionFactory
|
implements
|
IMapProjectionFactory
|
The configurator object for this type.
public
static
property
|
Config
{
get
}
|
||
type
|
IConfigurator<IMapProjectionFactory>
|
||
value
|
|
The configurator object. |
Returns the configuration value that describes this object.
public
abstract
method
|
ToConfig
()
|
||
type
|
ConfigValue
|
||
returns
|
|
The configuration value. | |
implements
|
IConfigurable.ToConfig
|
Remarks:
All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.
The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.
Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.
Maximum absolute value for Mercator latitude angles, in degrees.
public
constant
|
MercatorLatitude
=
85.0511287798066
|
||
type
|
float64
|
Remarks:
This
value
is
defined
as:
atan(sinh(pi))
See also:
MercatorCreates a new pseudo Mercator map projection factory.
[Pure]
|
||||
public
static
method
|
Mercator
()
|
|||
type
|
IMapProjectionFactory
|
|||
returns
|
|
The created IMapProjectionFactory object. |
Remarks:
The following figure shows the mapping between latitude/longitude values and map coordinates (by default the map is assumed to have a pixel coverage of PixelIsArea):
90°N 180°W 90°N 180°E (0|0) (w|0) <- sample coordinates (pixel-is-point) \ 0 1 ... w-1 / <- sample coordinates (pixel-is-area) (#)--+---+---+--(#) 0 | * | * | * | * | +---+---+---+---+ * := map sample (pixel-is-area) 1 | * | * | * | * | + := map sample (pixel-is-point) +---+---+---+---+ ...| * | * | * | * | w := raster width (here: 4) +---+---+---+---+ h := raster height (here: 4) h-1| * | * | * | * | (#)--+---+---+--(#) / \ (0|h) (w|h) <- map coordinates (pixel-is-point) 90°S 180°W 90°S 180°EChapter 1.3.3.2 Popular Visualisation Pseudo Mercator,
http://www.epsg.org
.
See also:
MercatorLatitudeCreates a new pseudo Plate Caree map projection factory.
[Pure]
|
||||
public
static
method
|
PlateCaree
(float64 longitudeLeft = -180,
float64 latitudeTop = 90,
float64 latitudeBottom = -90)
|
|||
type
|
IMapProjectionFactory
|
|||
params
|
longitudeLeft
|
Longitude
at
raster
space
X-coordinate
0 ,
in
degrees.
Defaults
to
-180
(180°W).
|
||
latitudeTop
|
Latitude
at
raster
space
Y-coordinate
0 ,
in
degrees.
Defaults
to
+90
(90°N).
|
|||
latitudeBottom
|
Latitude
at
raster
space
Y-coordinate
h
(see
figure),
in
degrees.
Defaults
to
-90
(90°S).
|
|||
returns
|
|
The created IMapProjectionFactory object. |
Remarks:
The following figure shows the mapping between latitude/longitude values and map coordinates:
90°N 180°W 90°N 180°E (0|0) (w|0) <- sample coordinates (pixel-is-point) \ 0 1 2 3 4 5 ... w-1 / <- sample coordinates (pixel-is-area) (#)--+---+---+---+---+---+---+--(#) 0 | * | * | * | * | * | * | * | * | +---+---+---+---+---+---+---+---+ * := map sample (pixel-is-area) 1 | * | * | * | * | * | * | * | * | + := map sample (pixel-is-point) +---+---+---+---+---+---+---+---+ ...| * | * | * | * | * | * | * | * | w := raster width (here: 8) +---+---+---+---+---+---+---+---+ h := raster height (here: 4) h-1| * | * | * | * | * | * | * | * | (#)--+---+---+---+---+---+---+--(#) / \ (0|h) (w|h) <- map coordinates (pixel-is-point) 90°S 180°W 90°S 180°EChapter 1.3.14.2 Pseudo Plate Caree,
http://www.epsg.org
.
Creates a new instance of IMapProjection.
public
method
|
CreateMapProjection
(MapInfo source,
MapInfo target,
bool reverse = false,
bool clip = false)
|
||
type
|
IMapProjection
|
||
params
|
source
|
The source raster space. | |
target
|
The target raster space. | ||
reverse
|
true
to
create
a
reverse
map
projection
(i.e.
one
that
transforms
from
target
to
source,
false
to
create
a
normal
map
projection.
Defaults
to
false .
|
||
clip
|
Clip
bad
geographic
coordinates
(see
GeographicClip)?
Defaults
to
false .
|
||
returns
|
|
The map projection. | |
implements
|
IMapProjectionFactory.CreateMapProjection
|
Remarks:
When a map projection factory transforms between map types (i.e. Rect to Cube or vice-versa), the source and target raster spaces can be swapped in order to create a reverse map projection (see Reverse). If the source and target map types are equal, an implementation cannot determine whether a reverse map projection is requested or not. In this case, the reverse parameter must be used.
Exceptions:
Returns the supported map projections.
protected
abstract
property
|
CreateMapProjection_Supported
{
get
}
|
||
type
|
int32
|
||
value
|
Bitmask
of
the
following
flags:
1 :
RECT
<=>
RECT
2 :
RECT
<=>
CUBE
|
CUBE
<=>
RECT
4 :
CUBE
<=>
CUBE
|
Remarks:
The
value
returned
here
is
only
used
for
error
reporting
and
should
correlate
with
the
return
values
of
the
CreateMapProjection_*
methods.
Creates a new instance of IMapProjection that projects Cube to Cube.
[EmptyBody]
|
||||
protected
virtual
method
|
CreateMapProjection_CubeToCube
(MapInfo source,
MapInfo target,
bool reverse)
|
|||
type
|
IMapProjection
|
|||
params
|
source
|
The source raster (of type Cube). | ||
target
|
The target raster (of type Cube). | |||
reverse
|
Creating a reverse map projection (the source and target rasters have already been swapped)? | |||
returns
|
The
map
projection
or
null
if
the
combination
of
source/target
raster
types
is
not
applicable
to
this
factory
(see
CreateMapProjection_Supported).
|
Creates a new instance of IMapProjection that projects Cube to Rect.
[EmptyBody]
|
||||
protected
virtual
method
|
CreateMapProjection_CubeToRect
(MapInfo source,
MapInfo target,
bool clip)
|
|||
type
|
IMapProjection
|
|||
params
|
source
|
The source raster (of type Cube). | ||
target
|
The target raster (of type Rect). | |||
clip
|
Clip bad geographic coordinates (see GeographicClip)? | |||
returns
|
The
map
projection
or
null
if
the
combination
of
source/target
raster
types
is
not
applicable
to
this
factory
(see
CreateMapProjection_Supported).
|
See also:
CreateMapProjection_SupportedCreates a new instance of IMapProjection that projects Rect to Cube.
[EmptyBody]
|
||||
protected
virtual
method
|
CreateMapProjection_RectToCube
(MapInfo source,
MapInfo target,
bool clip)
|
|||
type
|
IMapProjection
|
|||
params
|
source
|
The source raster (of type Rect). | ||
target
|
The target raster (of type Cube). | |||
clip
|
Clip bad geographic coordinates (see GeographicClip)? | |||
returns
|
The
map
projection
or
null
if
the
combination
of
source/target
raster
types
is
not
applicable
to
this
factory
(see
CreateMapProjection_Supported).
|
Creates a new instance of IMapProjection that projects Rect to Rect.
[EmptyBody]
|
||||
protected
virtual
method
|
CreateMapProjection_RectToRect
(MapInfo source,
MapInfo target,
bool reverse,
bool clip)
|
|||
type
|
IMapProjection
|
|||
params
|
source
|
The source raster (of type Rect). | ||
target
|
The target raster (of type Rect). | |||
reverse
|
Creating a reverse map projection (the source and target rasters have already been swapped)? | |||
clip
|
Clip bad geographic coordinates (see GeographicClip)? | |||
returns
|
The
map
projection
or
null
if
the
combination
of
source/target
raster
types
is
not
applicable
to
this
factory
(see
CreateMapProjection_Supported).
|