You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the GeoWebCache WMTS GetCapabilities request, I noticed that the order of the top left corner values of my layer's matrix set is incorrect. Instead of being Y, X, it is given as X, Y. Is there a way to modify this order and set it as Y, X?The incorrect order of the values has caused me to be unable to calculate the position of the first tile map correctly in the following code that uses GeoTools.
the code get wroing is in this line cause (lon - tileMatrixMinX) / tileSpanX + epsilon) and(lon - tileMatrixMinX) / tileSpanX + epsilon) It is a negative number.
long xTile = (long)((int)Math.floor((lon - tileMatrixMinX) / tileSpanX + epsilon));
long yTile = (long)((int)Math.floor((tileMatrixMaxY - lat) / tileSpanY + epsilon));
When I use the GeoWebCache WMTS GetCapabilities request, I noticed that the order of the top left corner values of my layer's matrix set is incorrect. Instead of being Y, X, it is given as X, Y. Is there a way to modify this order and set it as Y, X?The incorrect order of the values has caused me to be unable to calculate the position of the first tile map correctly in the following code that uses GeoTools.
the code get wroing is in this line cause (lon - tileMatrixMinX) / tileSpanX + epsilon) and(lon - tileMatrixMinX) / tileSpanX + epsilon) It is a negative number.
long xTile = (long)((int)Math.floor((lon - tileMatrixMinX) / tileSpanX + epsilon));
long yTile = (long)((int)Math.floor((tileMatrixMaxY - lat) / tileSpanY + epsilon));
public TileIdentifier identifyTileAtCoordinate(double lon, double lat, ZoomLevel zoomLevel) {
WMTSZoomLevel zl = (WMTSZoomLevel)zoomLevel;
TileMatrix tileMatrix = (TileMatrix)this.getMatrixSet().getMatrices().get(zl.getZoomLevel());
double pixelSpan = WMTSTileFactory.getPixelSpan(tileMatrix);
double tileSpanY = (double)tileMatrix.getTileHeight() * pixelSpan;
double tileSpanX = (double)tileMatrix.getTileWidth() * pixelSpan;
double tileMatrixMinX;
double tileMatrixMaxY;
if (tileMatrix.getCrs().getCoordinateSystem().getAxis(0).getDirection().equals(AxisDirection.EAST)) {
tileMatrixMinX = tileMatrix.getTopLeft().getX();
tileMatrixMaxY = tileMatrix.getTopLeft().getY();
} else {
tileMatrixMaxY = tileMatrix.getTopLeft().getX();
tileMatrixMinX = tileMatrix.getTopLeft().getY();
}
The text was updated successfully, but these errors were encountered: