我正在将分辨率为 58808x30323 的 GeoTiff (BigTiff) 切成 0.1 度到 0.1 度的片段,这样我们就可以将片段发送到移动设备。我正在用 Java 实现转换器。图像代表 DEM - 数字海拔模型(10 米)
我所拥有的和我所知道的:
- 图像被分成 128x128 块
- 我已经成功实现了读取 IFD(图像文件目录)值,并且可以读取每个图块并对其进行解压缩(使用 LZW 解压缩)
问题和疑问:
- 我不明白如何连接图像大小、图像内的图块数量和文件中提供的地理位置数据。我读过地理位置数据与图像的顶部像素有关。有人可以解释一下 - 使用什么公式?(当我理解像素和坐标之间的连接时,双线性插值会解决问题吗?)
- 图像被分成 128x128 的图块。128x128瓷砖的单位是什么?我怀疑像素不是这种情况,因为 58808(图像宽度)或 30323(图像高度)根本不能被 128 整除。如何计算 1 行中有多少个图块?
图像元数据:
FileSize 3249 MB
FileType BTF
FileTypeExtension btf
MIMEType mage/x-tiff-bigMIMEType
ImageWidth 58808
ImageHeight 30323
BitsPerSample 32
Compression LZW
PhotometricInterpretation BlackIsZero
SamplesPerPixel 1
PlanarConfiguration Chunky
Predictor None
TileWidth 128
TileLength 128
SampleFormat Float
PixelScale 10 10 0
ModelTiePoint 0 0 0 106549.267203769 576922.512073626 0
TileOffsets // there is 109020 offset numbers
TileByteCounts // there is 109020 byteCount numbers
GeoTiffDirectory
1 1 0 20 // Header
1024 0 1 1 // ModelTypeProjected -> 1 /* Projection Coordinate System */
1025 0 1 1 // RasterPixelIsPoint -> 2
1026 34737 31 0 // GTCitationGeoKey
2048 0 1 32767 // GeographicTypeGeoKey
2049 34737 63 31 // GeogCitationGeoKey
2050 0 1 6312 // Geodetic Datum Codes -> Datum_Militar_Geographische_Institut
2054 0 1 9102 // -> Angular_Degree = 9102
2057 34736 1 7 // GeogLinearUnits
2059 34736 1 6 // GeogInvFlatteningGeoKey
2061 34736 1 8 // GeogPrimeMeridianLongGeoKey
3072 0 1 32767 // ProjectedCSTypeGeoKey -> User defined
3074 0 1 32767 // ProjectionGeoKey -> User defined
3075 0 1 8 // ProjCoordTransGeoKey -> CT_LambertConfConic_2SP
3076 0 1 9001 // ProjLinearUnitsGeoKey -> Linear meter
3078 34736 1 2 // ProjStdParallel1GeoKey = 3078 /* GeogAngularUnit */
3079 34736 1 3 // ProjStdParallel2GeoKey = 3079 /* GeogAngularUnit */
3084 34736 1 1 // ProjFalseOriginLongGeoKey = 3084 /* GeogAngularUnit */
3085 34736 1 0 // ProjFalseOriginLatGeoKey = 3085 /* GeogAngularUnit */
3086 34736 1 4 // ProjFalseOriginEastingGeoKey = 3086 /* ProjLinearUnits */
3087 34736 1 5 //ProjFalseOriginNorthingGeoKey = 3087 /* ProjLinearUnits */
0 0 0 0II // End
GeoTiffDoubleParams 47.5 13.3333333333333 46 49 400000 400000 299.1528128 6377397.155 0II
GeoTiffAsciiParams PCS Name = MGI_Austria_Lambert|GCS Name = GCS_MGI|Ellipsoid = Bessel_1841|Primem = Greenwich||
GDALNoData -3.4028230607370965e+038
ImageSize 58808x30323
Megapixels 1783.2
tiff 文件也有 tfw 文件:
10.0000000000
0.0000000000
0.0000000000
-10.0000000000
106554.2672037689
576917.5120736258