worldToScreenTransform(Envelope mapExtent, Dimension destination) Gets up the affine transform that will transform from the world to the display of size
destination.
Field Detail
DEFAULT_CRS
final public static CoordinateReferenceSystem DEFAULT_CRS(Code)
Adds a IViewportModelListener to this map. A given listener will only be added once.
Parameters: listener - Listener to be added See Also: net.refractions.udig.project.ViewportModelEvent.ViewportModelEventType
Returns the bounding box of the Viewport in world coordinates.
Note: Since Envelope is not a UDIG element changes to the bounds envelope object will not
raise events. Therefore the bounds should only be modified via the ViewportModel interface
The bounds are in the same CRS as returned by
the bounding box of the Viewport in world coordinates. See Also: Envelope
Returns the local coordinate system. The local coordinate system is the CRS that all the
layer data will be transformed into. Once the layer data is transformed into the local CRS
then it is transformed for display onto the screen
the local coordinate system See Also: CoordinateReferenceSystem
Returns the center of the viewport in world coordinates. The bounds are in the same CRS as
returned by
the center of the viewport in world coordinates See Also: Coordinate
Find the scale denominator of the map.
Method:
1. find the diagonal distance (meters)
2. find the diagonal distance (pixels)
3. find the diagonal distance (meters) -- use DPI
4. calculate scale (#1/#2)
NOTE: return the scale denominator not the actual scale (1/scale = denominator)
TODO: (SLD spec page 28):
Since it is common to integrate the output of multiple servers into a single displayed result in the
web-mapping environment, it is important that different map servers have consistent behaviour with respect to
processing scales, so that all of the independent servers will select or deselect rules at the same scales.
To insure consistent behaviour, scales relative to coordinate spaces must be handled consistently between map
servers. For geographic coordinate systems, which use angular units, the angular coverage of a map should be
converted to linear units for computation of scale by using the circumference of the Earth at the equator and
by assuming perfectly square linear units. For linear coordinate systems, the size of the coordinate space
should be used directly without compensating for distortions in it with respect to the shape of the real Earth.
NOTE: we are actually doing a a much more exact calculation, and accounting for non-square pixels
the scale denominator of the map on the current display. Return -1 if something is wrong. For example the display has notyet been created.
Returns the Viewport's width in world coordinates. The bounds are in the same CRS as returned
by
the Viewport's width in world coordinates.
pixelToWorld
public Coordinate pixelToWorld(int x, int y)(Code)
Converts a coordinate expressed on the device space back to real world coordinates
Parameters: x - horizontal coordinate on device space Parameters: y - vertical coordinate on device space The correspondent real world coordinate See Also: Coordinate
Returns the pixel on the screen for a given coordinate in world space.
Parameters: coord - A coordinate in world space. The pixel on the screen that the world coordinate is drawn on. See Also:Point See Also: Coordinate
Gets up the affine transform that will transform from the world to screen. A convenience
method.
a transform that maps from real world coordinates to the screen See Also:AffineTransform
Gets up the affine transform that will transform from the world to the display of size
destination. A convenience method. This method is independent of the CRS.
a transform that maps from real world coordinates to the screen