二维瓦片的相关概念

发布时间:2026/10/31 22:28:14
二维瓦片的相关概念 概念正射影像正射影像是一种经过几何纠正比如使之拥有统一的比例尺的航摄像片与没有纠正过的航摄像片不同的是人们可以使用正射影像量测实际距离因为它是通过校正透视变形后得到的地球表面的真实描述。 与传统的地形图相比正射影像或正射影像图DOM具有资讯量大、形象直观、易于判读和现势性强等诸多优点因而常被应用到地理信息系统GIS中。参考:https://zh.wikipedia.org/wiki/正射影像Web-Mercator投影墨卡托投影英语Mercator projection另称正轴等角圆柱投影是一种等角的圆柱形地图投影法。其得名于法兰德斯地理学家杰拉杜斯·墨卡托他于1569年发表长202厘米、宽124厘米以此方式绘制的世界地图。该地图将地球在平面展开经纬线于任何位置皆垂直相交使地图形成一个简洁的长方形地图的任一点在各种方向的长度均相等。由于可显示任意两点间的正确方位及经纬度航海用途的海图、航路图大都以此方式绘制。在该投影中线型比例尺在图中任意一点周围都保持不变从而可以保持大陆轮廓投影后的角度和形状不变即等角。墨卡托投影的缺点是其会使高纬度地区面积变形失真纬度越高变形越严重赤道地区几乎没有变形问题但接近南北极的高纬度地区如格陵兰面积可被失真放大数倍之多。虽则如此但因为大部分国际航线均位于南北回归线之间的低纬度地带墨卡托投影法于该等区域中的变形程度尚算可接受故仍被广泛应用为目前世上最普及的地图投影法。投影公式推导目标从球面几何与局部保角条件推导球面墨卡托投影F : ( λ , φ ) ↦ ( x , y ) F:(\lambda,\varphi)\mapsto(x,y)F:(λ,φ)↦(x,y)。假设地球为半径R RR的球体经度λ \lambdaλ、纬度φ \varphiφ均以弧度表示中央经线为0 00赤道投影为y 0 y0y0。纬度范围− π / 2 φ π / 2 -\pi/2\varphi\pi/2−π/2φπ/2。1. 从圆弧长度建立球面上的微小距离基本公式为s r θ sr\thetasrθ其中θ \thetaθ用弧度表示。东西方向d s E R cos ⁡ φ d λ ds_ER\cos\varphi\,d\lambdadsE​Rcosφdλ南北方向d s N R d φ ds_NR\,d\varphidsN​Rdφ2. 设定投影形式与约束满足平面东西距离 地球东西距离 平面南北距离 地球南北距离 \frac{平面东西距离}{地球东西距离}\frac{平面南北距离}{地球南北距离}地球东西距离平面东西距离​地球南北距离平面南北距离​k E d x d s E R d λ R cos ⁡ φ d λ 1 cos ⁡ φ k_E\frac{dx}{ds_E}\frac{R\,d\lambda}{R\cos\varphi\,d\lambda}\frac{1}{\cos\varphi}kE​dsE​dx​RcosφdλRdλ​cosφ1​k N d y d s N f ′ ( φ ) d φ R d φ f ′ ( φ ) R k_N\frac{dy}{ds_N}\frac{f(\varphi)\,d\varphi}{R\,d\varphi}\frac{f(\varphi)}RkN​dsN​dy​Rdφf′(φ)dφ​Rf′(φ)​令k E k N k_Ek_NkE​kN​得到要解的一阶常微分方程d y d φ R cos ⁡ φ R sec ⁡ φ \boxed{\frac{dy}{d\varphi}\frac{R}{\cos\varphi}R\sec\varphi}dφdy​cosφR​Rsecφ​3. 分离变量积分求解将方程写成微分形式d y R sec ⁡ φ d φ dyR\sec\varphi\,d\varphidyRsecφdφ两侧积分y R ∫ sec ⁡ φ d φ C yR\int\sec\varphi\,d\varphiCyR∫secφdφC为求出右侧分子分母同乘sec ⁡ φ tan ⁡ φ \sec\varphi\tan\varphisecφtanφ∫ sec ⁡ φ d φ ∫ sec ⁡ 2 φ sec ⁡ φ tan ⁡ φ sec ⁡ φ tan ⁡ φ d φ \int\sec\varphi\,d\varphi\int\frac{\sec^2\varphi\sec\varphi\tan\varphi}{\sec\varphi\tan\varphi}\,d\varphi∫secφdφ∫secφtanφsec2φsecφtanφ​dφ因为( tan ⁡ φ ) ′ sec ⁡ 2 φ (\tan\varphi)\sec^2\varphi(tanφ)′sec2φ( sec ⁡ φ ) ′ sec ⁡ φ tan ⁡ φ (\sec\varphi)\sec\varphi\tan\varphi(secφ)′secφtanφ令u sec ⁡ φ tan ⁡ φ u\sec\varphi\tan\varphiusecφtanφ则d u ( sec ⁡ 2 φ sec ⁡ φ tan ⁡ φ ) d φ du(\sec^2\varphi\sec\varphi\tan\varphi)d\varphidu(sec2φsecφtanφ)dφ故∫ sec ⁡ φ d φ ∫ d u u ln ⁡ ∣ u ∣ C ln ⁡ ∣ sec ⁡ φ tan ⁡ φ ∣ C \int\sec\varphi\,d\varphi\int\frac{du}{u}\ln|u|C\ln|\sec\varphi\tan\varphi|C∫secφdφ∫udu​ln∣u∣Cln∣secφtanφ∣C代回并利用赤道边界条件y ( 0 ) 0 y(0)0y(0)0有ln ⁡ ( sec ⁡ 0 tan ⁡ 0 ) ln ⁡ 1 0 \ln(\sec0\tan0)\ln10ln(sec0tan0)ln10所以积分常数为C 0 C0C0。y R ln ⁡ ( sec ⁡ φ tan ⁡ φ ) yR\ln(\sec\varphi\tan\varphi)yRln(secφtanφ)由三角恒等式sec ⁡ φ tan ⁡ φ tan ⁡ ( π / 4 φ / 2 ) \sec\varphi\tan\varphi\tan(\pi/4\varphi/2)secφtanφtan(π/4φ/2)得到x R λ y R ln ⁡ tan ⁡ ( π 4 φ 2 ) \boxed{\begin{aligned}xR\lambda\\yR\ln\tan\left(\frac{\pi}{4}\frac{\varphi}{2}\right)\end{aligned}}xy​RλRlntan(4π​2φ​)​​需要额外注意一下墨卡托投影的x,y范围都在( x , y ) ∈ [ − π R , π R ] (x,y) \in [-\pi R,\pi R](x,y)∈[−πR,πR]之中珊格瓦片先区分几个概念 概念可以参考OGC Two Dimensional Tile Matrix Set and Tile Set Metadata Spec算法概念1.1 grid 网格⁠network composed of two or more sets of curves in which the members of each set intersect the members of the other sets in an algorithmic way1.2space partitioning (空间划分process of dividing a geometric space (usually a Euclidean space) into two or moredisjoint subsets (see also partition of a set). Space partitioning divides a spaceinto non-overlapping regions. Any point in the space can then be identified to lie inexactly one of the regions1.3tessellationIn addition to the definition provided in the Terms and Definition, theTessellationconcept includes the rules for tessellating space into aTileSet. The specific allowed/requiredTessellationapproaches are specified in the logical model. For the purposes of this Abstract Specification,tilingis consider a synonym.其决定square,hexagon,triangle等瓦片形状分割的算法。GIS概念2.1 **cell **⁠minimum geometrical spaces delimited by the grid lines of a regular grid.相当于像素的概念这里翻译成像元和像素点不同的是,cell认为是有其长和宽可以理解其负责的呈相范围2.2 ** tile**geometric shape with known properties that may or may not be the result of a tiling(tessellation) process. A tile consists of a single connected “piece” without “holes”or “lines” (topological disc).In the context of a 2D tile matrix, a tile is one of the rectangular regions ofspace, which can be uniquely identified by an integer row and column, making up thetile matrix. In the context of a geospatial data tile set, a tile contains data for such apartition of space as part of an overall set of tiles for that tiled geospatial data.瓦片的概念和网格的概念有些像但是我们需要说明的是 瓦片是一个有自我生命周期的实体而网格更相当于一个算法上的逻辑概念In addition to the definition provided in the Terms and Definition, theTessellationconcept includes the rules for tessellating space into aTileSet. The specific allowed/requiredTessellationapproaches are specified in the logical model. For the purposes of this Abstract Specification,tilingis consider a synonym2.3tile matrixtiling grid in a given 2D coordinate reference system, associated to a specific scaleand partitioning space into regular conterminous tiles, each of which beingassigned a unique identifier相同resolution的 tile matrix一层tile的几何2.4tile matrix settiling scheme consisting of a set of tile matrices defined at different scalescovering approximately the same area and having a common coordinate reference system.根据不同的resolution分类的不同的tile matrix2.5 tile indexA tile index provides an efficient (fast) mechanism for finding any tile or set of tiles in a tiled data store when using a spatial filter, including a point and query operation. Typical spatial indexing are R-Trees and Quad-Trees. The logical model specifies no requirements for how a spatial index is constructed or the technology used. However, the tile extents, tile addresses, and tile references can be used to populate a spatial index, such as an R-Tree.网格索引针对一个层级的tile matrix需要进行索引划分标记每一个tile下面这个是四叉树的网格但是对于珊格瓦片来说使用固定的四叉树网格并且使用Z-Order 排序(或者叫Morton 索引) 使用这个的好处是 空间上相邻的物理存储上也可以做到相邻减少磁盘IO的成本对于珊格瓦片TMS瓦片发布的索引是左下角为原点(0,0)对于WMTS和XYZ瓦片发布则是左上角为原点。下面这个图是以左上为原点的cv概念TIFFprinter language or page description language. The purpose of TIFF is to describe and store raster image data.A primary goal of TIFF is to provide a rich environment within which applica- tions can exchange image data. This richness is required to take advantage of the varying capabilities of scanners and other imaging devices.Though TIFF is a rich format, it can easily be used for simple scanners and appli- cations as well because the number of required fields is small.TIFF will be enhanced on a continuing basis as new imaging needs arise. A high priority has been given to structuring TIFF so that future enhancements can be added without causing unnecessary hardship to developers.我们重点需要关注的是geotiff 他是tif的增强版本额外增加了一些字段用于记录空间信息的geotiffThis OGC® Standard defines the Geographic Tagged Image File Format (GeoTIFF) by specifying the content and structure of a group of industry-standard tag sets for the management of georeferenced or geocoded raster imagery using Adobe’s publicly-available Tagged Image File Format (TIFF).GeoTIFF defines a set of TIFF tags provided to describe all “Cartographic” information associated with TIFF imagery that originates from satellite imaging systems, scanned aerial photography, scanned maps, digital elevation models, or as a result of geographic analyses. The goal is to provide a consistent mechanism for referencing a raster image to a known model space or earth-based coordinate reference system and for describing those coordinate reference systems.The tags documented in this standard are to be considered completely orthogonal (i.e., independent) to the raster-data descriptions of the TIFF specification, and impose no restrictions on how the standard TIFF tags are to be interpreted, which color spaces or compression types are to be used, and so forth.This OGC Standard is a minor revision of GeoTIFF focused on updating the current GeoTIFF community specification and aligning it with current OGC standardization practice. This includes enabling the use of coordinate reference systems that have been included in EPSG register since the GeoTIFF 1.0 specification dating from 1995. As such, the OGC GeoTIFF Standard should be backward compatible with the 1.0 version, both for coordinate reference systems based on EPSG register codes, or user-defined coordinate reference systems. Backward compatibility documents this backward compatibility and the evolutions of the 1.1 revision为了给图像添加空间参考信息一个简单的想法就是利用 TIFF 的 tags 来存储空间参考。但在实际实现中为了节省 TIFF 预留的标签资源GeoTIFF 使用了 GeoKeys 来组织众多空间参数所有 GeoKeys 由 GeoKeyDirectoryTag 来索引。颜色磁盘存储方式分为三种存储方式分别是Band Sequential 按照波段进行存储一个波段的数据存储完存储下一个Band Interleaved by Line 按行交错是BSQ和BIP的妥协版本按照行进行像素的交错存储一行内按照像素交错存储Band Interleaved by Pixel 按照像素进行交错像素的数据结构Each image pixel in a data file has a numeric value, and for any image the pixel values will fall within a certain range, for example integers from 0 to 255. Some images have pixel with real (floating point) number values or that span a larger range of values. Assigning adata typeto an image constrains the pixel values allowed. A “byte image” is a common term used to denote that an image has pixels values that fit within a single byte of computer storage, that is, integer values from 0 to 255. Data types are more complicated when the numeric values are outside this range or when floating point values are required. Each pixel value might require 2 or 4 or even 8 bytes, and the order of the bytes is important, at least to the computer. This is why you need specialized software to work with some archive images: web browsers and general software are not good at working with images that have complex data types. It is possible to convert an image from a complex data type to a simple one that web browsers can understand (the browse version mentioned above), but you lose the science data fidelity.参考资料https://docs.ogc.org/is/17-083r4/17-083r4.html#toc54https://docs.ogc.org/as/19-014r3/19-014r3.htmlhttps://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdfhttps://docs.ogc.org/is/19-008r4/19-008r4.htmlhttps://blog.geohey.com/geotiff-shu-ju-ge-shi-tan-suo/https://an.rsl.wustl.edu/help/Content/Using the Notebook/Concepts and deep dive/Image primer.htm?utm_sourcechatgpt.com

关于本文作者

来自尧图内容编辑团队

尧图内容编辑团队 内容团队

尧图内容编辑团队

本文由尧图网络内容编辑团队执笔。团队由资深项目经理、前端工程师与设计师组成,所有内容均来自亲手交付的真实项目,先讲清问题、再给出可落地的解法。尧图深耕北京网站建设十年,服务过京华建材集团、智造科技等各行业客户,把一线经验沉淀为可复用的行业观察。

  • 十年建站经验,覆盖建材、制造、服务、文创等
  • 项目经理把关选题与事实准确性
  • 工程师与设计师联合撰写专业细节
  • 统一编辑规范,保证文风与排版一致
  • 每月复盘转化数据,迭代选题方向

延伸阅读

相关资讯与近期热门内容

深度阅读推荐

建站决策前值得细读的三篇

网站改版的5个关键决策
2024-08-12

网站改版的5个关键决策

什么时候该改版、改到什么程度、如何避免流量掉光,京华建材集团改版复盘给出答案。

获取专属建站方案

看完文章,把您的行业与预算告诉我们,免费获取一份量身定制的官网建设方案与报价。

立即免费咨询