public class MercatorImage extends Object implements CoordinateTransformer
Constructor and Description |
---|
MercatorImage(BBox bbox,
int width,
int height)
Create a new MercatorImage with the given size and positional
information.
|
MercatorImage(double lon1,
double lat1,
double lon2,
double lat2,
int width,
int height)
Create a new MercatorImage with the given size and positional
information.
|
Modifier and Type | Method and Description |
---|---|
BBox |
getDefiningBoundingBox()
Get the bounding box that was used to create this image.
|
int |
getHeight() |
double |
getImageSx()
The image shows a part of the whole world, which is projected onto a
Mercator square whose size can be obtained using
. |
double |
getImageSy()
The image shows a part of the whole world, which is projected onto a
Mercator square whose size can be obtained using
. |
double |
getLat1() |
double |
getLat2() |
double |
getLon1() |
double |
getLon2() |
BBox |
getVisibleBoundingBox()
Get the bounding box that is really visible on the image.
|
int |
getWidth() |
double |
getWorldSize()
The image shows a part of the whole world which is projected onto a
Mercator square, whose size can be obtained using this method.
|
double |
getX(double lon) |
double |
getY(double lat) |
public MercatorImage(BBox bbox, int width, int height)
bbox
- the bbox to cover.width
- the width of the image.height
- the height of the image.public MercatorImage(double lon1, double lat1, double lon2, double lat2, int width, int height)
lon1
- leftmost longitude.lat1
- top latitude.lon2
- rightmost longitude.lat2
- bottom latitude.width
- the width of the image in pixels.height
- the height of the image in pixels.public double getX(double lon)
getX
in interface CoordinateTransformer
public double getY(double lat)
getY
in interface CoordinateTransformer
public BBox getDefiningBoundingBox()
public BBox getVisibleBoundingBox()
public int getWidth()
public int getHeight()
public double getLon1()
public double getLat1()
public double getLon2()
public double getLat2()
public double getImageSx()
getWorldSize()
. Get the relative position of the
visible part of the image on this Mercator square in image space units.public double getImageSy()
getWorldSize()
. Get the relative position of the
visible part of the image on this Mercator square in image space units.public double getWorldSize()