Class BBOXConverter
- java.lang.Object
-
- org.gcube.application.geoportaldatamapper.exporter.gis.BBOXConverter
-
public class BBOXConverter extends Object
The Class BBOXConverter.- Author:
- Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Dec 18, 2023
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBBOXConverter.BBOXPixelThe Class BBOXPixel.
-
Field Summary
Fields Modifier and Type Field Description static doubleEQUATOR
-
Constructor Summary
Constructors Constructor Description BBOXConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DoublebboxOffset(String cMin, String cMax)Bbox offset.static StringbboxWithOffset(String wmsVersion, String bbox, double bboxOffset)Bbox with offset.static DoublebestBBOXOffset(String wmsVersion, String source_bbox)Best BBOX offset.static org.gcube.spatial.data.geoutility.shared.BBOXconvertToCoordinate(BBOXConverter.BBOXPixel bboxP, Integer[] size)Convert to coordinate.static BBOXConverter.BBOXPixelconvertToPixel(Integer[] size, Double[] bbox)Convert to pixel.static List<Double>mercatorToPixels(List<Double> bbox)Converts spherical web mercator to tile pixel X/Y at zoom level 0 for 256x256 tile size and inverts y coordinates.static org.gcube.spatial.data.geoutility.shared.BBOXtoBBOX(String wmsVersion, String bbox)To BBOX.
-
-
-
Field Detail
-
EQUATOR
public static final double EQUATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
convertToPixel
public static BBOXConverter.BBOXPixel convertToPixel(Integer[] size, Double[] bbox)
Convert to pixel.- Parameters:
size- the sizebbox- the bbox- Returns:
- the BBOX converter. BBOX pixel
-
convertToCoordinate
public static org.gcube.spatial.data.geoutility.shared.BBOX convertToCoordinate(BBOXConverter.BBOXPixel bboxP, Integer[] size)
Convert to coordinate.- Parameters:
bboxP- the bbox Psize- the size- Returns:
- the bbox
-
bboxWithOffset
public static String bboxWithOffset(String wmsVersion, String bbox, double bboxOffset)
Bbox with offset.- Parameters:
wmsVersion- the wms versionbbox- the bboxbboxOffset- the bbox offset- Returns:
- the string
-
toBBOX
public static org.gcube.spatial.data.geoutility.shared.BBOX toBBOX(String wmsVersion, String bbox)
To BBOX.- Parameters:
wmsVersion- the wms versionbbox- the bbox- Returns:
- the bbox
-
mercatorToPixels
public static List<Double> mercatorToPixels(List<Double> bbox)
Converts spherical web mercator to tile pixel X/Y at zoom level 0 for 256x256 tile size and inverts y coordinates.- Parameters:
bbox- the bbox- Returns:
- {L.point} point with tile pixel x and y coordinates.
-
bboxOffset
public static Double bboxOffset(String cMin, String cMax)
Bbox offset.- Parameters:
cMin- the c mincMax- the c max- Returns:
- the double
-
-