Merge pull request #12713 from tschaub/geotiff-crs
Check for GeoTIFF CRS starting with last image
This commit is contained in:
@@ -416,13 +416,17 @@ class GeoTIFFSource extends DataTile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this.getProjection()) {
|
if (!this.getProjection()) {
|
||||||
const firstImage = sources[0][0];
|
const firstSource = sources[0];
|
||||||
if (firstImage.geoKeys) {
|
for (let i = firstSource.length - 1; i >= 0; --i) {
|
||||||
const code =
|
const image = firstSource[i];
|
||||||
firstImage.geoKeys.ProjectedCSTypeGeoKey ||
|
if (image.geoKeys) {
|
||||||
firstImage.geoKeys.GeographicTypeGeoKey;
|
const code =
|
||||||
if (code) {
|
image.geoKeys.ProjectedCSTypeGeoKey ||
|
||||||
this.projection = getProjection(`EPSG:${code}`);
|
image.geoKeys.GeographicTypeGeoKey;
|
||||||
|
if (code) {
|
||||||
|
this.projection = getProjection(`EPSG:${code}`);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user