update gis

This commit is contained in:
tengge 2020-08-02 07:22:55 +08:00
parent cf767b4ea4
commit bcfb1ba7d4
5 changed files with 9 additions and 20 deletions

View File

@ -57,21 +57,11 @@ ArcgisElevationCoverage.prototype.retrieveTileImage = function (tile) {
return;
}
let z = 360 / (tile.sector.maxLongitude - tile.sector.minLongitude);
let x = (180 + tile.sector.minLongitude) / 360 * Math.pow(2, z);
if (Math.abs(tile.sector.minLatitude) > 85.01) {
return;
}
let lat = Math.log(Math.tan((Math.PI / 2.0 + tile.sector.minLatitude * Math.PI / 180) / 2.0)) * 180 / Math.PI;
let y = Math.floor((180 - lat) / 360 * Math.pow(2, z));
this.worker.postMessage({
tileKey: tile.tileKey,
x,
y,
z
x: tile.column,
y: tile.row,
z: tile.level.levelNumber
});
this.currentRetrievals.push(tile.tileKey);

View File

@ -913,9 +913,6 @@ Tessellator.prototype.isTileVisible = function (dc, tile) {
if (dc.globe.projectionLimits && !tile.sector.overlaps(dc.globe.projectionLimits)) {
return false;
}
if (tile.level.levelNumber < 4) {
return true;
}
return tile.extent.intersectsFrustum(dc.frustumInModelCoordinates);
};

View File

@ -107,7 +107,7 @@ function TiledElevationCoverage(config) {
* @type {Boolean}
* @default true
*/
this.pixelIsPoint = false;
this.pixelIsPoint = true;
/**
* The {@link LevelSet} dividing this coverage's geographic domain into a multi-resolution, hierarchical

View File

@ -68,6 +68,8 @@ ProjectionWgs84.prototype.geographicToCartesian = function (globe, latitude, lon
"geographicToCartesian", "missingGlobe"));
}
// latitude = WWMath._mercatorLatInvert(latitude); // TODO
var cosLat = Math.cos(latitude * Angle.DEGREES_TO_RADIANS),
sinLat = Math.sin(latitude * Angle.DEGREES_TO_RADIANS),
cosLon = Math.cos(longitude * Angle.DEGREES_TO_RADIANS),
@ -120,7 +122,7 @@ ProjectionWgs84.prototype.geographicToCartesianGrid = function (globe, sector, n
lat = maxLat; // explicitly set the last lat to the max longitude to ensure alignment
}
//lat = WWMath._mercatorLatInvert(lat); // TODO
lat = WWMath._mercatorLatInvert(lat); // TODO
// Latitude is constant for each row. Values that are a function of latitude can be computed once per row.
cosLat = Math.cos(lat);

View File

@ -449,10 +449,10 @@ Tile.computeColumn = function (delta, longitude) {
* @returns {Number} The computed row number.
*/
Tile.computeLastRow = function (delta, maxLatitude) {
var row = Math.ceil((maxLatitude + 90) / delta - 1);
var row = Math.ceil((maxLatitude + 180) / delta - 1);
// If max latitude is in the first row, set the max row to 0.
if (maxLatitude + 90 < delta) {
if (maxLatitude + 180 < delta) {
row = 0;
}