如何确定tiff是否已地理定位?


40

我收到某人的tiff文件,但不确定是否已地理参考。有一个简单的方法来检查吗?


3
您正在使用什么软件?如果使用的是ArcMap,则将其加载到数据框中,右键单击它并选择属性,然后可以从中查找文件信息。我确定其他软件也有类似的过程。

谢谢,很容易。我不知道是否有可以运行的命令行工具(也许使用gdal之类的东西)。
杰夫·斯托里

Answers:


42

看起来gdalinfo会告诉您:

从ArcMap布局导出的非地理参考地物:

C:\Temp>gdalinfo figure1.tif
Driver: GTiff/GeoTIFF
Files: figure1.tif
Size is 244, 210
Coordinate System is `'
Metadata:
  TIFFTAG_XRESOLUTION=96
  TIFFTAG_YRESOLUTION=96
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  210.0)
Upper Right (  244.0,    0.0)
Lower Right (  244.0,  210.0)
Center      (  122.0,  105.0)
Band 1 Block=244x11 Type=Byte, ColorInterp=Red
Band 2 Block=244x11 Type=Byte, ColorInterp=Green
Band 3 Block=244x11 Type=Byte, ColorInterp=Blue

航拍照片:

C:\Temp>gdalinfo Adona_1.tif
Driver: GTiff/GeoTIFF
Files: Adona_1.tif
       Adona_1.tif.ovr
       Adona_1.tfw
       Adona_1.tif.aux.xml
Size is 5426, 5522
Coordinate System is:
PROJCS["NAD83 / Arkansas North",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.2572221010002,
                AUTHORITY["EPSG","7019"]],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",36.23333333333333],
    PARAMETER["standard_parallel_2",34.93333333333333],
    PARAMETER["latitude_of_origin",34.33333333333334],
    PARAMETER["central_meridian",-92],
    PARAMETER["false_easting",1312333.333333333],
    PARAMETER["false_northing",0],
    UNIT["US survey foot",0.3048006096012192,
        AUTHORITY["EPSG","9003"]],
    AUTHORITY["EPSG","26951"]]
Origin = (1045317.554567784100000,261147.746197238540000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
  TIFFTAG_SOFTWARE=Adobe Photoshop CS4 Windows
  TIFFTAG_DATETIME=2010:08:04 07:39:30
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( 1045317.555,  261147.746) ( 92d53'31.49"W, 35d 2'50.94"N)
Lower Left  ( 1045317.555,  258386.746) ( 92d53'31.19"W, 35d 2'23.64"N)
Upper Right ( 1048030.555,  261147.746) ( 92d52'58.86"W, 35d 2'51.19"N)
Lower Right ( 1048030.555,  258386.746) ( 92d52'58.56"W, 35d 2'23.88"N)
Center      ( 1046674.055,  259767.246) ( 92d53'15.03"W, 35d 2'37.41"N)
Band 1 Block=5426x1 Type=Byte, ColorInterp=Red
  Overviews: 2713x2761, 1357x1381, 679x691, 340x346, 170x173
Band 2 Block=5426x1 Type=Byte, ColorInterp=Green
  Overviews: 2713x2761, 1357x1381, 679x691, 340x346, 170x173
Band 3 Block=5426x1 Type=Byte, ColorInterp=Blue
  Overviews: 2713x2761, 1357x1381, 679x691, 340x346, 170x173

16

补充乍得的答案:TIF随附有.TFW文件吗?如果是这样,则该图像具有未嵌入在标题中的地理参考信息。我不知道GDALINFO是否能赶上。

不幸的是,TFW只给您坐标和像元大小。它没有指定图像所引用的CRS /投影/基准,也没有指定用于投影的单位。


好点,凯文。
乍得·库珀

没有tfw,所以我希望它嵌入在标题中。我将进行一些测试,以查看gdal在文件中提供的信息。谢谢。
杰夫·斯托里

我不会说这是一个很好的指示。ArcMap 10使用嵌入式地理配准冗余tfw文件创建GeoTIFF。
2013年

7

在ESRI世界中,如果图像已进行地理定位,但未校正,则gdalinfo将不会返回投影信息

Driver: GTiff/GeoTIFF
Files: COVE_COGEO.tif
       COVE_COGEO.aux
       Cove_COGEO.rrd
       COVE_COGEO.tif.aux.xml
Size is 6618, 8176
Coordinate System is `'
Metadata:
  TIFFTAG_IMAGEDESCRIPTION=
  TIFFTAG_MAXSAMPLEVALUE=1
  TIFFTAG_MINSAMPLEVALUE=0
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_XRESOLUTION=300
  TIFFTAG_YRESOLUTION=300
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 8176.0)
Upper Right ( 6618.0,    0.0)
Lower Right ( 6618.0, 8176.0)
Center      ( 3309.0, 4088.0)
Band 1 Block=6618x512 Type=Byte, ColorInterp=Red
  Overviews: 1655x2044, 828x1022, 414x511, 207x256, 104x128, 52x64
Band 2 Block=6618x512 Type=Byte, ColorInterp=Green
  Overviews: 1655x2044, 828x1022, 414x511, 207x256, 104x128, 52x64
Band 3 Block=6618x512 Type=Byte, ColorInterp=Blue
  Overviews: 1655x2044, 828x1022, 414x511, 207x256, 104x128, 52x64

如果查看tif.aux.xml,将找到投影信息:

<?xml version="1.0" encoding="UTF-8"?>-
<GeodataXform xmlns:typens="http://www.esri.com/schemas/ArcGIS/9.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="typens:PolynomialXform">
<PolynomialOrder>1</PolynomialOrder>-<SpatialReference xsi:type="typens:ProjectedCoordinateSystem">  <WKT>PROJCS["NAD_1983_UTM_Zone_15N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-93.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]</WKT>
      <XOrigin>-5682839.5944962</XOrigin>
      <YOrigin>-10997760.6594148</YOrigin>
      <XYScale>409501512.793437</XYScale>
      <ZOrigin>-100000</ZOrigin>
      <ZScale>10000</ZScale>
      <MOrigin>-100000</MOrigin>
      <MScale>10000</MScale>
      <XYTolerance>0.001</XYTolerance>
      <ZTolerance>0.001</ZTolerance>
      <MTolerance>0.001</MTolerance>
      <HighPrecision>true</HighPrecision>
    </SpatialReference>-<SourceGCPs xsi:type="typens:ArrayOfDouble">
    <Double>1.57734892030567</Double>
    <Double>25.8359122977818</Double>
    <Double>20.4046417720032</Double>
    <Double>25.9084153582944</Double>
    <Double>20.4733053142072</Double>
    <Double>3.14623602371285</Double>
    <Double>1.61802731006583</Double>
    <Double>3.1060187781668</Double>
    </SourceGCPs>-<TargetGCPs xsi:type="typens:ArrayOfDouble">
    <Double>362267.039129157</Double>
    <Double>3818630.52804079</Double>
    <Double>373747.691530917</Double>
    <Double>3818468.79669514</Double>
    <Double>373558.508499628</Double>
    <Double>3804605.04409216</Double>
    <Double>362064.5523863</Double>
    <Double>3804768.11127776</Double>
    </TargetGCPs>
    </GeodataXform>

但是,一旦更正后的gdalinfo将起作用,并且数据将不再位于tif.aux.xml中,因此您可能必须在两个地方都查找。


3

还有listgeo,它是libgeotiff的一部分。

另外,如果您使用的是Windows,则还有一个方便的GUI应用程序geotifcp(也是libgeotiff的一部分),可让您轻松地将元数据转储并还原到geotiff-如果您想以非空间方式编辑geotiff,则非常有用启用的图像编辑软件或将空间元数据应用于分类结果等。


2

如何确定tiff是否已地理定位?

下载ftp://ftp.remotesensing.org/geotiff/libgeotiff/listgeo_GUI.zip

在listgeo_GUI.zip中:

GUI形式的GeoTIFF工具

(1)。“ listgeo.exe”-用于转储GeoTIFF文件的元数据的实用程序。(2)。“ geotifcp.exe”-用于将元数据应用于TIFF文件,使其成为GeoTIFF文件的实用程序。

它们已随流行的libgeotiff库免费分发。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.