public class ScaleZoomLevelMatcher extends Object
Constructor and Description |
---|
ScaleZoomLevelMatcher(CoordinateReferenceSystem crsMap,
CoordinateReferenceSystem crsTiles,
MathTransform transformMapToTileCrs,
MathTransform transformTileCrsToMap,
ReferencedEnvelope mapExtentTileCrs,
ReferencedEnvelope mapExtentMapCrs,
double scale) |
Modifier and Type | Method and Description |
---|---|
static ScaleZoomLevelMatcher |
createMatcher(ReferencedEnvelope requestExtent,
CoordinateReferenceSystem crsTiles,
double scale) |
CoordinateReferenceSystem |
getCrsMap() |
CoordinateReferenceSystem |
getCrsTiles() |
ReferencedEnvelope |
getMapExtentTileCrs() |
double |
getOptimumScaleFromZoomLevel(int zoomLevel,
TileService wmtSource) |
double |
getOptimumScaleFromZoomLevel(int zoomLevel,
TileService service,
double[] tempScaleList)
Calculates the "best" scale for a given zoom-level by calculating the scale for a tile in the
center of the map-extent and by taking the mapCrs in account.
|
static ReferencedEnvelope |
getProjectedEnvelope(ReferencedEnvelope envelope,
CoordinateReferenceSystem destinationCRS,
MathTransform transformation)
Re-Projects the given envelope to destinationCRS using transformation.
|
double |
getScale() |
int |
getZoomLevelFromScale(TileService service,
double[] tempScaleList)
Finds out the best fitting zoom-level for a given map-scale.
|
ReferencedEnvelope |
projectMapToTileCrs(ReferencedEnvelope boundsInMapCrs) |
ReferencedEnvelope |
projectTileToMapCrs(ReferencedEnvelope boundsInTileCrs) |
public ScaleZoomLevelMatcher(CoordinateReferenceSystem crsMap, CoordinateReferenceSystem crsTiles, MathTransform transformMapToTileCrs, MathTransform transformTileCrsToMap, ReferencedEnvelope mapExtentTileCrs, ReferencedEnvelope mapExtentMapCrs, double scale)
public static ScaleZoomLevelMatcher createMatcher(ReferencedEnvelope requestExtent, CoordinateReferenceSystem crsTiles, double scale) throws FactoryException, TransformException
FactoryException
TransformException
public static ReferencedEnvelope getProjectedEnvelope(ReferencedEnvelope envelope, CoordinateReferenceSystem destinationCRS, MathTransform transformation) throws TransformException, FactoryException
TransformException
FactoryException
public CoordinateReferenceSystem getCrsMap()
public CoordinateReferenceSystem getCrsTiles()
public ReferencedEnvelope getMapExtentTileCrs()
public double getScale()
public int getZoomLevelFromScale(TileService service, double[] tempScaleList)
public double getOptimumScaleFromZoomLevel(int zoomLevel, TileService service, double[] tempScaleList)
public double getOptimumScaleFromZoomLevel(int zoomLevel, TileService wmtSource)
public ReferencedEnvelope projectTileToMapCrs(ReferencedEnvelope boundsInTileCrs) throws Exception
Exception
public ReferencedEnvelope projectMapToTileCrs(ReferencedEnvelope boundsInMapCrs) throws Exception
Exception
Copyright © 1996–2022 Geotools. All rights reserved.