GeoTiff读取

更新时间:2023-08-10 00:36:17 阅读: 评论:0

GeoTiff读取
GeoTiff格式读取注意事项:
1.GeoKey directory前4个数值为头信息;
2.GeoTiff修正号表⽰为.;
3.Header={KeyDirectoryVersion, KeyRevision, MinorRevision,
NumberOfKeys}⽬前DirectoryVersion号为1,NumberOfKeys表明Key的个数
4.KeyEntry = { KeyID, TIFFTagLocation, Count, Value_Offt } 其中,TIFFTagLocation表⽰哪个tag存放值,如果值为0则表⽰值为SHORT类型且包含在Value_Offt元素中;
此外还有GeoTagDoubleParams双精度型,该域ID号为34736,保存不定个数的double型GeoKeys,FLOAT要转化成double型才能存在该种Tag 中;
GeoTagASCIIParamsASCII型,该域ID号为34737,保存不定长度的ASCII型GeoKeys,每个GeoKey结束的位置加⼀个分割字符“|”,⼀般只有Citation的Key才为ASCII型;
5.GeoTiff⽀持的3种坐标空间(如⽂章);
6.GeoTiff中6个GeoTag域的具体含义(如⽂章),注意其中对于KeyEntry内容的详细描述;
7.图像数据地理编码的具体步骤(如⽂章);
8.栅格空间向模型空间的转换步骤(如⽂章);
9.举例,如下:
GeoKeyDirectoryTag=( 1, 1, 2, 6,
伞的英语单词
1024, 0, 1, 2,
1026, 34737,12, 0,
2048, 0, 1, 32767,史记翻译
2049, 34737,14, 12,
2050, 0, 1, 6,
2051, 34736, 1, 0 )
GeoDoubleParamsTag(34736)=(1.5)
GeoAsciiParamsTag(34737)=("Custom File|My Geographic|")
第⼀⾏表明这是⼀个版本号为1的GeoTIFF GeoKey⽬录,键的版本为Rev.
1.2,在这个标签中定义了6个键。
下⼀⾏定义第⼀个键(ID=1024 = GTModelTypeGeoKey),值为2(Geographic),
直接放在元素列表中(因为TIFFTagLocation=0);
下⼀⾏键1026(the GTCitationGeoKey),列在GeoAsciiParamsTag(34737)数组
中开始于偏移0,数到第12个字节,所以其值为"Custom File"(”|”被转换
为结束符了)
再下⾯⼀⾏,键2051(GeogLinearUnitSizeGeoKey) 位于GeoDoubleParamsTag (34736), 偏移为0所以值为1.5
key2049的值为(GeogCitationGeoKey) is "My Geographic"。
10.怀疑在TIFF中⽤SamplesPerPixel, PlanarConfiguration, ExtraSamples来表⽰
多光谱数据,应该从这些地⽅⼊⼿,察看!
11.以下为地理坐标与投影坐标转换的⽰意:
Projected_CS = Geographic_CS + Projection
Geographic_CS = Angular_Unit + Geodetic_Datum + Prime_Meridian
Projection = Linear Unit + Coord_Transf_Method + CT_Parameters Coord_Transf_Method = { TransverMercator | LambertCC | ...} CT_Parameters = {OriginLatitude + StandardParallel+...}
12.纬度⾚道以北为正,⾚道以南为负;经度本初⼦午线以东为正,以西为
负;GeoTiff中也包括了不以格林尼治天⽂台为零点的经度
13.在⽤地理坐标系描述⼀个点时,地球和椭球的关系⼀定要定义
14.A geographic coordinate system has two axes, latitude and longitude, which are
only unambiguous when both of the related prime meridian and geodetic datum are given, and in turn the geodetic datum definition includes the definition of an
ellipsoid//地理坐标系定义需要的条件:经纬度,本初⼦午线,⼤地基准点
15.
ModelPixelScaleTag
ModelTiepointTag
R ------------ OR --------------> M
(I,J,K) ModelTransformationTag (X,Y,Z)
//表⽰将栅格图像空间和模型空间绑在⼀起,表⽰模型空间如何将坐标与地球相
16.ModelPixelScaleTag(在图像发⽣旋转和剪切时不能使⽤该Tag)和TiePoint:通过这两个来表⽰图像空间和模型空间之间的关系17.ModelTransformationTag = (a,b,c,,n,o,p):如果ModelTie
pointTag和ModelPixelScaleTag已经定义,则不定义该标签,在定义⼀个Tiepoint和ModelPixelScale可以计算该转换矩阵
18.下⾯给出了如何定义⼀个栅格图像空间坐标所需要的Tag
Here is a 4-step guide to producing a t of Baline GeoTIFF tags for defining coordinate transformation information of a raster datat.
Step 1: Establish the Raster Space coordinate system ud:
RasterPixelIsArea or RasterPixelIsPoint.
Step 2: Establish/define the model space Type in which the image is to be georeferenced. Usually this will be a Projected Coordinate system (PCS). If you are geocoding this data t, then the model space is defined to be the corresponding geographic, geocentric or Projected coordinate system (skip to the "Cookbook" ction 2.7.3 first to do determine this).
Step 3: Identify the nature of the transformations needed to tie the raster data down to the model space coordinate system:
//注意以下情况分类考虑,读写都要考虑
Ca 1: The model-location of a raster point (x,y) is known, but not the scale or orientations:U the ModelTiepointTag to define the (X,Y,Z) coordinates of the known raster point.
Ca 2: The location of three non-collinear raster points are known exactly, but the linearity of the transformation is not known. U the ModelTiepointTag to define the (X,Y,Z) coordinates of all three known raster points. Do not compute or define the ModelPixelScale or ModelTransformation tag.
Ca 3: The position and scale of the data is known exactly, and no rotation or shearing is needed to fit into the model space. U the ModelTiepointTag to define the (X,Y,Z) coordinates of the known raster point, and the ModelPixelScaleTag to
specify the scale.
Ca 4: The raster data requires rotation and/or lateral shearing to fit into the defined model space: U the ModelTransformation matrix to define the transformation.
Ca 5: The raster data cannot be fit into the model space with a simple affine transformation (rubber-sheeting required). U only the ModelTiepoint tag, and specify as many tiepoints as your application requires. Note, however, that this is not a Baline GeoTIFF implementation, and should
not be ud for interchange; it is recommended that the image be geometrically rectified first, and put into a standard projected coordinate system.
Step 4: Install the defined tag values in the TIFF file and clo it.
19.Cookbook for Geocoding Data
//Geocoding的整个流程
Step 1: Determine the Coordinate system type of the raster data, bad on the nature of the data: pixels derived from scanners or other optical devices reprent areas, and most commonly will u the RasterPixelIsArea coordinate system. Pixel data such as digital elevation models reprent points, and will probably u RasterPixelIsPoint coordinates. Store in: GTRasterTypeGeoKey//保存栅格图像的信息
Step 2: Determine which class of model space coordinates are most natural for this datat:Geographic, Geocentric, or Projected Coordinate System. Usually this will be PCS.
Store in: GTModelTypeGeoKey//保存模型空间坐标系类型的信息
Step 3: This step depends on the GTModelType:
ca PCS: the PCS projection system. Most of the
PCS's ud in standard State Plane and national grid systems
are defined, so check this list first; the EPSG index in
ction 6.4 may be uful for this purpo.
//察看6.4部分,可以得到⾮常有⽤的信息,关于标准的坐标系,保存在以下Key中
Store in: ProjectedCSTypeGeoKey, ProjectedCSTypeGeoKey
If coded, it will not be necessary to specify the Projection
datum, etc for this ca, since all of tho parameters
are determined by the ProjectedCSTypeGeoKey code. Skip to
step 4 from here.
If none of the coded PCS's match your system, then this is a
手续英文ur-defined PCS. U the Projection code list to check for
standard projection systems.
Store in: ProjectionGeoKey and skip to Geographic CS ca.
If none of the Projection codes match your system, then this
is a ur-defined projection. U the ProjCoordTransGeoKey to
specify the coordinate transformation method (e.g. Transver
Mercator), and all of the associated parameters of that method.
Also define the linear units ud in the planar coordinate
system.
Store in: ProjCoordTransGeoKey, ProjLinearUnitsGeoKey
Now continue on to define the Geographic CS, below.
ca GEOCENTRIC:
ca GEOGRAPHIC: Check the list of standard GCS's and u the
corresponding code. To u a code both the Datum, Prime
Meridian, and angular units must match tho of the code.
//查找与GCS相应的基准⾯,本初⼦午线和⾓度单位
Store in: GeographicTypeGeoKey and skip to Step 4.
If none of the coded GCS's match exactly, then this is a
ur-defined GCS. Check the list of standard datums,
Prime Meridians, and angular units to define your system.
Store in: GeogGeodeticDatumGeoKey, GeogAngularUnitsGeoKey, GeogPrimeMeridianGeoKey and skip to Step 4.
If none of the datums match your system, you have a
ur-defined datum, which is an odd system, indeed. U
the GeogEllipsoidGeoKey to lect the appropriate ellipsoid
or u the GeogSemiMajorAxisGeoKey, GeogInvFlatteningGeoKey to
define, and give a reference using the GeogCitationGeoKey.
Store in: GeogEllipsoidGeoKey, etc. and go to Step 4.
Step 4: Install the GeoKeys/codes into the GeoKeyDirectoryTag, and the
DOUBLE and ASCII key values into the corresponding value-tags.
Step 5: Having completely defined the Raster & Model coordinate system,
go to Cookbook ction 2.6.2 and u the Georeferencing Tags
to tie the raster image down onto the Model space.
20. Common Examples
er mapper
UTM Projected Aerial Photo
We have an aerial photo which has been orthorectified and resampled to a UTM grid, zone 60, using WGS84 datum; the coordinates of the upper-left corner of the image is are given in easting/northing, as 350807.4m, 5316081.3m. The scanned map pixel scale is 100 meters/pixels (the actual dpi scanning ratio is irrelevant).
ModelTiepointTag = (0, 0, 0, 350807.4, 5316081.3, 0.0)
ModelPixelScaleTag = (100.0, 100.0, 0.0)
GeoKeyDirectoryTag:
niit
GTModelTypeGeoKey = 1 (ModelTypeProjected)
GTRasterTypeGeoKey = 1 (RasterPixelIsArea)
ProjectedCSTypeGeoKey = 32660 (PCS_WGS84_UTM_zone_60N)
PCSCitationGeoKey = "UTM Zone 60 N with WGS84"
Notes:
1) We did not need to specify the GCS lat-long, since the
PCS_WGS84_UTM_zone_60N codes implies particular
GCS and units already (WGS_84 and meters). The citation
shippingwas added just for documentation.
//不需要说明GCS的经纬度,本⾝已经包含了这些信息
2) The "GeoKeyDirectoryTag" is expresd using the "GeoKey"
structure defined above. At the TIFF level the tags look like
this:
GeoKeyDirectoryTag=( 1, 0, 2, 4,
1024, 0, 1, 1,
新概念2听力下载
1025, 0, 1, 1,
3072, 0, 1, 32660,
3073, 34737, 25, 0 )
GeoAsciiParamsTag(34737)=("UTM Zone 60 N with WGS84|")
For the rest of the examples we will only show the GeoKey-level
dump, with the understanding that the actual TIFF-level tag
reprentation can be determined from the documentation.
Standard State Plane
We have a USGS State Plane Map of Texas, Central Zone, using NAD83, correctly oriented. The map resolution is 1000 meters/pixel, at origin. There is a grid interction line in the image at pixel location (50,100), and corresponds to the projected coordinate system easting/northing of (949465.0, 3070309.1).
语文学习方法
ModelTiepointTag = ( 50, 100, 0, 949465.0, 3070309.1, 0)
ModelPixelScaleTag = (1000, 1000, 0)
GeoKeyDirectoryTag:
GTModelTypeGeoKey = 1 (ModelTypeProjected)
GTRasterTypeGeoKey = 1 (RasterPixelIsArea)
ProjectedCSTypeGeoKey = 32139 (PCS_NAD83_Texas_Central)
Notice that in this ca, since the PCS is a standard code, we
do not need to define the GCS, datum, etc, since tho are implied
瘾科技by the PCS code. Also, since this is NAD83, meters are ud ratherddm
than US Survey feet (as in NAD 27).
Lambert Conformal Conic Aeronautical Chart
We have a 500 x 500 scanned aeronautical chart of Seattle, WA, using Lambert Conformal Conic projection, correctly oriented. The central meridian is at 120 degrees west. The map resolution is 1000 meters/pixel, at origin, and us NAD27 datum. The standard parallels of the projection are at 41d20m N and 48d40m N. The latitude of the origin is at 45 degrees North, and occurs in the image at the raster
coordinates (80,100). The origin is given a fal easting and northing of 200000m, 1500000m.
ModelTiepointTag = ( 80, 100, 0, 200000, 1500000, 0)

本文发布于:2023-08-10 00:36:17,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/78/1128550.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:空间   图像   定义
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图