WO2021204026A1 - Distributed system-based concurrent construction method for massive dem pyramid tiles - Google Patents

Distributed system-based concurrent construction method for massive dem pyramid tiles Download PDF

Info

Publication number
WO2021204026A1
WO2021204026A1 PCT/CN2021/084081 CN2021084081W WO2021204026A1 WO 2021204026 A1 WO2021204026 A1 WO 2021204026A1 CN 2021084081 W CN2021084081 W CN 2021084081W WO 2021204026 A1 WO2021204026 A1 WO 2021204026A1
Authority
WO
WIPO (PCT)
Prior art keywords
tile
key
dem
slice
value
Prior art date
Application number
PCT/CN2021/084081
Other languages
French (fr)
Chinese (zh)
Inventor
朱必亮
徐忠建
李俊
Original Assignee
速度时空信息科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 速度时空信息科技股份有限公司 filed Critical 速度时空信息科技股份有限公司
Publication of WO2021204026A1 publication Critical patent/WO2021204026A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation

Definitions

  • the invention relates to the technical field of geospatial data parallel processing, in particular to a method for parallel construction of massive DEM pyramid slices based on a distributed system.
  • Chinese patent document CN201710107308.X discloses a DEM-based method for delimiting an inflow lake catchment area, which includes obtaining DEM data of a digital elevation model in a set area, and cutting it to obtain basic DEM data. The DEM data establishes the ridge line in the set area, and divides the spatial unit to calculate the spatial raster data. This patent does not involve parallel and DEM pyramid algorithms.
  • Chinese patent document 201410687961.4 discloses a structured multi-scale reconstruction method suitable for regular grid DEM, which also does not involve pyramid building and parallel methods.
  • Chinese Patent Document 201410788404.1 discloses an adaptive image pyramid slicing method for relational database expansion.
  • An adaptive image slicing model is proposed, and the size of the image slice is adaptively selected according to the adaptive image slicing model.
  • the image slice involves the null value of the image element, and does not involve the stitching method of the DEM slice.
  • GIS software mainly commercial GIS software has the function of DEM pyramid slicing. These methods mainly use different sampling algorithms to segment the DEM, and do not implement distributed DEM pyramid slicing.
  • the technical problem to be solved by the present invention is to provide a method for parallel construction of massive DEM pyramid slices based on a distributed system, which can perform parallel segmentation of large-scale or massive DEM pyramid slices, and can be distributed in a high-performance computer cluster environment
  • Formula calculation reduces the time for pyramid construction and improves calculation efficiency.
  • the value of the edge of the DEM slice can be calculated in combination with the adjacent average method to solve the smooth transition between adjacent slices.
  • the technical solution adopted by the present invention is: the parallel construction method of massive DEM pyramid slices based on a distributed system specifically includes the following steps:
  • S1 gets the metadata Metadata of the source DEM
  • S2 establishes the local coordinate system of the source DEM, and divides the source DEM to form a number of parallel-calculated slice tiles (a slice is to cut a DEM into many small pieces of the same size); and according to the Calculate the parameters of the source DEM and record the index value of each sliced Tile as Key.
  • S3 sets or calculates the maximum level MaxZoom according to whether the maximum level MaxZoom is defined, and then sets the required output slice tile parameters; then calculates the output slice tile parameters according to the set coordinate system and segmentation rule, the output slice tile
  • the parameters include slice length, width, resolution, etc.
  • the S4 computing node constructs the assigned key-value pair ⁇ Key, Tile> in parallel, and merges the elevation value Value on the same computing node according to the index value Key; respectively according to the index value Key according to the length, width, and resolution parameters of the output tile Calculate the outer rectangle Extend of the corresponding tile, calculate the coordinates of each grid cell in the input tile, and then calculate the coordinates of each grid cell in the output coordinate system according to the set output coordinate system; Calculate the index value Key of the output slice Tile where the corresponding grid unit cell is located according to the coordinates of each grid unit cell, and add it to a mapping Map to form a mapping Map ⁇ Key, List ⁇ cell> >, where Key represents the index value of the slice, List represents a linked list, and cell represents a grid unit;
  • S5 merges the linked lists List ⁇ cell> of the same index value Key on the computing nodes; merges the linked lists List ⁇ cell> on all computing nodes according to the index value Key to form a key-value pair ⁇ Key, List ⁇ cell>>;
  • S6 calculates the coordinates of the grid unit cell of the output tile tile according to the parameters and coordinate system of the output tile tile, and then calculates the elevation value of the grid unit cell from the merged key-value pair ⁇ Key, List ⁇ cell>> according to the sampling method Value;
  • S7 uses the 8-neighbor algorithm to modify the elevation value of the tile edge of the output slice; according to the generated linked list List ⁇ Key, Tile>, the four-sided grid cell of each tile and the 8 adjacent slices are obtained cyclically Tile, take the average of the grid cell elevation values of adjacent tile tiles as the elevation value Value of the corresponding grid cell to achieve the smooth splicing of tile tiles;
  • S9 calculates and generates the next level slice Tile and index value Key in parallel according to the upper level slice tile and sampling algorithm; calculates the next level corresponding to the current level slice tile according to the index value Key, the next level and the parameters of the slice tile.
  • the first-level index value Key uses the sampling algorithm to sample the elevation value of the next level slice from the current level slice tile to form the sub-slices of the next level slice tile and the index value Key, and merge the same on each node
  • the index value Key of forms the key value pair ⁇ Key, List ⁇ Tile>>; then according to the index value Key, merge the slice tiles of the same index value Key on all nodes to form the next level of slice tiles, and then perform step S7 ;
  • S10 executes steps S8 ⁇ S9 in a loop until it is judged that the level Zoom meets the termination condition, the termination condition is: if the minimum level MinZoom is set, then it is judged whether the current level Zoom reaches the set minimum level MinZoom, if it reaches, then terminate; if The minimum level MinZoom is not set, if the current level zoom is less than 0, it will be terminated.
  • Tile represents the slice
  • Key represents the index value of the slice
  • Value represents the elevation value
  • List represents the linked list
  • cell represents the grid unit
  • Zoom represents the level
  • Map represents the mapping
  • Extend represents the outsourcing rectangle of the source DEM; using the above technical solution, obtain the pending Split the metadata Metadata of the source DEM as the basis for data segmentation and projection conversion; establish a coordinate system with the upper left corner of the source DEM as the origin and the positive direction downward and right, and the source DEM will be adjusted according to the width and height of the default tile
  • the map frame is segmented
  • the index value Key is formed according to the row and column numbers of the preliminary segmented Tile, and a key-value pair is constructed with the index value Key as the key and the sliced Tile as the value; the key-value pairs are distributed on different computing nodes as follows Calculation; according to the set MaxZoom or calculated MaxZoom, as well as the set width and height, coordinate system and sampling algorithm of the output tile tile, each computing node performs segmentation calculation
  • the metadata in the step S1 includes the original resolution, the coordinate system, and the extent data of the outer rectangle of the source DEM in the source coordinate system.
  • the purpose of obtaining the metadata of the source DEM is for the needs of subsequent calculations. These calculations include preliminary segmentation of the source data to facilitate the parallelization of subsequent calculations.
  • the establishment of the local coordinate system of the source DEM in step S2 is specifically: establishing a coordinate system with the upper left corner of the source DEM as the origin, and downward and right as the positive direction; according to the width of the set tile Hegao, divide the source DEM data into multiple slice tiles, in order to make a preliminary segmentation of the source DEM to form a linked list List ⁇ Key, Tile>, in which the calculation method of the index value Key:
  • C and R represent the row and column number of the tile
  • x and y represent the slice coordinates of any point of the tile
  • XMin represents the X minimum value of the outer rectangle Extent of the source DEM
  • YMin represents the Y minimum value of the outer rectangle Extent of the source DEM.
  • TH is the height of the initial tile
  • TW is the width of the initial tile.
  • the level MaxZoom needs to be calculated.
  • the calculation process is based on the coordinates of the lower left point and the upper right point of the outer envelope rectangle Extend of the source DEM, and the coordinates of the lower left point Perform projection conversion with the coordinates of the upper right point and convert them into latitude and longitude coordinates.
  • the coordinates of the lower left point are (SLon, SLat) and the coordinates of the upper right point are (ELon, ELat); then the level MaxZoom is calculated according to the formula, and the calculation formula is as follows:
  • MaxZoom is the maximum level
  • dLat is the difference in latitude
  • dLon is the difference in longitude
  • lat1 is the radian of SLat
  • lat2 is the radian of ELat
  • a is the calculated intermediate value
  • dist is the distance between two points
  • tilesize is the maximum side set by the Tile.
  • the grid unit cell ⁇ x, y, Value>, where x and y are the coordinates of the tile in the slice, and Value is the elevation value.
  • the step S4 calculates the input slice tiles in parallel, and divides the DEM value of the input slice Tile into different output slice tiles according to the parameters of the output slice Tile; among them, first, according to the index value of the input slice Tile, Key Calculate the Extend of the tile, the calculation formula:
  • MinX, MinY, MaxX, MaxY respectively represent the minimum and maximum XY coordinate values of the outer rectangle Extend, col, row are the row and column numbers of the input slice Tile, and ExMinX and ExMinY represent the minimum X and Y coordinate values of the outer rectangle Extend of the source DEM , H represents the height of the tile, and W represents the width of the tile.
  • the output linked list List ⁇ Key, Tile> is calculated in parallel for the adjacent tile tiles, and the intersection is divided by the four sides.
  • the cell value of the adjacent grid cell outside, and the upper and lower or left and right cells are selected, and the average value of the obtained cell value is taken as the elevation value of the specified grid cell;
  • the calculation of the elevation value of the four corner points is Take the values of the other three adjacent tiles and the corresponding corner points of the tile, and take the average value as the elevation value of the corresponding grid cell.
  • the present invention has the beneficial effects that: the distributed system-based parallel construction method for massive DEM pyramid slices has the following advantages: using high-performance computing clusters, the construction of DEM pyramid slices for large-scale DEM data is realized. Parallelization can reduce the time for DEM pyramid construction and improve calculation efficiency; 8-neighbor smoothing is performed on the edge elevation value of the slice to avoid the smoothing of DEM visualization and analysis calculation.
  • Fig. 1 is a working flow chart of the method for parallel construction of massive DEM pyramid slices based on a distributed system of the present invention
  • FIG. 2 is a schematic diagram of the local coordinate system segmentation DEM of the method for parallel construction of massive DEM pyramid slices based on the distributed system of the present invention
  • FIG. 3 is a schematic diagram of the calculation of a single computing node of the method for parallel construction of massive DEM pyramid slices based on a distributed system of the present invention
  • FIG. 4 is a schematic diagram of the merging of multiple computing nodes of the method for parallel construction of massive DEM pyramid slices based on the distributed system of the present invention
  • FIG. 5 is a schematic diagram of edge smoothing of the method for parallel construction of massive DEM pyramid slices based on a distributed system of the present invention
  • FIG. 6 is a visualization diagram of the method for parallel construction of massive DEM pyramid slices based on a distributed system of the present invention
  • Picture (a) is a 17-level picture
  • Picture (b) is a 17-level and 16-level mosaic display picture
  • Picture (c) is a 17-level Wireframe picture
  • Picture (d) is a 17-level and 16-level mosaic Wireframe picture.
  • Embodiment As shown in Figures 1 to 6, the parallel construction method of massive DEM pyramid slices based on a distributed system specifically includes the following steps:
  • Tile represents the slice
  • Key represents the index value of the slice
  • Value represents the elevation value
  • List represents the linked list
  • cell represents the grid unit
  • zoom represents the level
  • Map represents the mapping
  • Extend represents the outsourcing rectangle of the source DEM
  • ⁇ Key, Tile> represents the key Value pair
  • S1 uses source DEM data with a resolution of 30 meters and a part of high-precision source DEM data, the data format is tif, and the set coordinate system is WGS84; the pyramid slicing program based on the Flink distributed platform is developed separately;
  • S2 establishes a local coordinate system for the input source DEM data, sets the height and width of the initial division slice to be 126 (grid), uses the sliding window method to segment the source data, and then divides the source data according to the ranks of the tiles in the local coordinate system
  • Calculate the Key construct a series of ⁇ Key, Tile> key-value pairs, and distribute the key-value pair data to different computing nodes according to Flink’s algorithm for calculation; the establishment takes the upper left corner of the source DEM as the origin, and downwards to the right as The coordinate system in the positive direction; the calculation method of the index value Key:
  • C and R represent the row and column number of the tile
  • x and y represent the slice coordinates of any point of the tile
  • XMin represents the X minimum value of the outer rectangle Extent of the source DEM
  • YMin represents the Y minimum value of the outer rectangle Extent of the source DEM.
  • TH is the height of the initial tile
  • TW is the width of the initial tile;
  • S3 sets or calculates the maximum level MaxZoom according to whether the maximum level MaxZoom is defined, and then calculates the parameters of the output slice tile according to the set coordinate system and segmentation rule; the parameters of the output slice tile include the length, width, and resolution of the slice If the maximum level MaxZoom is not set, the maximum level MaxZoom needs to be calculated.
  • the calculation process is based on the coordinates of the lower left point and the upper right point of the outer rectangle Extend of the source DEM, and the coordinates of the lower left point and the upper right point are projected Convert to latitude and longitude coordinates, where the coordinates of the lower left point are (SLon, SLat), and the coordinates of the upper right point are (ELon, ELat); then the maximum level MaxZoom is calculated according to the formula, and the calculation formula is as follows:
  • MaxZoom is the maximum level
  • dLat is the difference in latitude
  • dLon is the difference in longitude
  • lat1 is the radian of SLat
  • lat2 is the radian of ELat
  • a is the calculated intermediate value
  • dist is the distance between two points
  • tilesize is the maximum side set by the Tile.
  • the parameters of the output slice tile set in step S3 are: width and height are 65 (grid), The coordinate system is WGS84, and the naming of the index value Key follows the TMS standard;
  • the S4 computing node constructs the assigned key-value pair ⁇ Key, Tile> in parallel, and merges the elevation value Value on the same computing node according to the index value Key; respectively according to the index value Key according to the length, width, and resolution parameters of the output tile
  • Calculate the outer rectangle Extend of the corresponding sliced Tile calculate the coordinates of each grid cell in the input slice Tile, and calculate the initial segmented tiles separately; first calculate the Extend of the tile according to the index value Key; calculate each tile in the input slice
  • the coordinates of a grid cell, where cell ⁇ x,y,Value>, where x and y are the coordinates of the Tile, and Value is the coordinates of the elevation value.
  • the step S4 calculates the input slice Tile in parallel, and divides the DEM value of the input slice Tile into different output slice tiles according to the parameters of the output slice Tile; among them, first according to the input slice Tile
  • the index value Key calculates the outer rectangle Extend of the Tile, the calculation formula is:
  • MinX, MinY, MaxX, MaxY respectively represent the minimum and maximum XY coordinate values of the outer rectangle Extend, col, row are the row and column numbers of the input slice Tile, and ExMinX and ExMinY represent the minimum X and Y coordinate values of the outer rectangle Extend of the source DEM , H represents the height of the tile, and W represents the width of the tile;
  • S7 uses the 8-neighborhood algorithm to modify the elevation value Value of the tile edge; according to the generated linked list List ⁇ Key, Tile>, it cyclically obtains the four-sided grid cell of each tile tile and the 8 adjacent tiles.
  • Tile take the average of the grid unit elevation values of adjacent tile tiles as the elevation value Value of the corresponding grid unit cell to achieve smooth tile tile splicing; according to the output key-value pair ⁇ Key, Tile>, according to the index value Key
  • calculate the 8 adjacent tiles of each tile take the cell value of the adjacent tiles, and use the average value as the value of the corresponding cell to achieve smooth tile splicing; the principle diagram is shown in Figure 5;
  • S9 calculates and generates the next level slice Tile and index value Key in parallel according to the upper level slice tile and sampling algorithm; calculates the next level corresponding to the current level slice tile according to the index value Key, the next level and the parameters of the slice tile.
  • the first-level index value Key uses the sampling algorithm to sample the elevation value of the next level slice from the current level slice tile to form the sub-slices of the next level slice tile and the index value Key, and merge the same on each node
  • the index value Key of forms the key value pair ⁇ Key, List ⁇ Tile>>; then according to the index value Key, merge the slice tiles of the same index value Key on all nodes to form the next level of slice tiles, and then perform step S7 ;
  • the nearest neighbor sampling algorithm is used;
  • S10 cyclically executes steps S8 ⁇ S9, calculating the next level of List ⁇ Key, Tile>, until it is judged that the current level of Zoom meets the termination condition, the termination condition is: if the minimum level of MinZoom is set, it is judged whether the current level of Zoom has reached Set the minimum level of MinZoom, if it reaches the minimum level, then terminate; if the minimum level of MinZoom is not set, the current level of Zoom is less than 0, then terminate.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • Remote Sensing (AREA)
  • Image Processing (AREA)
  • Image Generation (AREA)

Abstract

A distributed system-based concurrent construction method for massive DEM pyramid tiles, comprising the following specific steps: obtain the metadata of a DEM to be segmented; establish a DEM local coordinate system; segment the DEM into several tiles that may be concurrently calculated; calculate Maxzoom, and set the width and height of an output tile, a coordinate system, and a sampling algorithm; each computing node performs segmentation computing on a distributed input tile; merge the cell values of the same key on each computing node; merge a plurality of key/value pairs outputted by the cells of the same key on different computing nodes; use a 8-neighborhood algorithm to correct the elevation value of the edge of the tile; and use an upper-level output list <Key, Tile> as input, circularly compute the zoom and the width and height data of the tile of a next level, perform segmentation, sampling, and merging on each computing node, and output a next-level tile until circulation is terminated.

Description

基于分布式系统的海量DEM金字塔切片并行构建方法Parallel construction method of massive DEM pyramid slices based on distributed system 技术领域Technical field
本发明涉及地理空间数据并行处理技术领域,具体涉及一种基于分布式系统的海量DEM金字塔切片并行构建方法。The invention relates to the technical field of geospatial data parallel processing, in particular to a method for parallel construction of massive DEM pyramid slices based on a distributed system.
背景技术Background technique
目前,随着DEM(数字高程模型Digital Elevation Model)的需求日益增大,高精度、高分辨率DEM数据量呈几何级的增长,DEM金字塔切片的理论与方法也趋于成熟,但如何对海量的DEM数据高效切片处理,是DEM广泛应用亟待解决的关键问题。随着并行计算、分布式计算平台的快速发展和趋于成熟,为海量DEM金字塔切片的并行计算提供高效的算力。结合并行计算和成熟的DEM采样算法、基于四叉树的分割算法实现DEM金字塔切片的并行构建方法,可提高DEM数据计算的效率。At present, with the increasing demand for DEM (Digital Elevation Model), the amount of high-precision and high-resolution DEM data is increasing geometrically. The theory and method of DEM pyramid slicing are also becoming mature, but how to deal with the massive The efficient slicing of DEM data is a key issue that needs to be solved urgently in the wide application of DEM. With the rapid development and maturity of parallel computing and distributed computing platforms, it provides efficient computing power for the parallel computing of massive DEM pyramid slices. Combining parallel computing and mature DEM sampling algorithm, quadtree-based segmentation algorithm to realize the parallel construction method of DEM pyramid slices can improve the efficiency of DEM data calculation.
近年来,国内外学者开始重点研究海量空间数据的分布式计算和分析,在构建DEM金字塔方面,一般还是集中在线程并行策略,主要是结合高性能计算机下利用多线程来构建海量DEM金字塔切片,这种方式能够充分发挥机器的性能,但是如果DEM数据量较大,一般的计算机内存不能够承受,达不到计算的效果。关于DEM分析计算方面也有一些专利。中国专利文献089098709949.5公开了一种面向并行数字地形分析海量DEM部署与调度方法,解决了海量DEM的地形分析的效率,此专利未涉及DEM金字塔切片的内容。中国专利文献CN201710107308.X公开了一种基于DEM的内流湖集水区划定方法,其包括获取设定区域内高程数字模型的DEM数据,并对其进行切割,得到基础DEM数据,根据基础DEM数据确立设定区域内的山脊线,并对空间单元进行分割计算空间栅格数据。本专利没有涉及并行和DEM金字塔的算法。中国专利文献201410687961.4公布了一种适于规则网格DEM的结构化多尺度重构方法,同样没有涉及金字塔建立和并行方法。中国专利文献201410788404.1公开了一种面向关系数据库扩展的自适应影像金字塔切片方法,提出了自适应影像切片模型,根据自适应影像切片模型自适应的选择影像切片的大小。影像切片涉及影像元的空值,不涉及DEM切片的拼接方面的方法。在软件方面,主要是商业GIS软件具有DEM金字塔切片的功能,这些方法的 主要采用不同的采样算法来切分DEM,未实现分布式的DEM金字塔切片等内容。In recent years, scholars at home and abroad have begun to focus on distributed computing and analysis of massive spatial data. In building DEM pyramids, they generally focus on thread parallel strategies, mainly combining high-performance computers and using multithreading to build massive DEM pyramid slices. This method can give full play to the performance of the machine, but if the amount of DEM data is large, the general computer memory cannot bear it, and the calculation effect cannot be achieved. There are also some patents on DEM analysis and calculation. Chinese patent document 089098709949.5 discloses a massive DEM deployment and scheduling method for parallel digital terrain analysis, which solves the efficiency of massive DEM terrain analysis. This patent does not involve the content of DEM pyramid slices. Chinese patent document CN201710107308.X discloses a DEM-based method for delimiting an inflow lake catchment area, which includes obtaining DEM data of a digital elevation model in a set area, and cutting it to obtain basic DEM data. The DEM data establishes the ridge line in the set area, and divides the spatial unit to calculate the spatial raster data. This patent does not involve parallel and DEM pyramid algorithms. Chinese patent document 201410687961.4 discloses a structured multi-scale reconstruction method suitable for regular grid DEM, which also does not involve pyramid building and parallel methods. Chinese Patent Document 201410788404.1 discloses an adaptive image pyramid slicing method for relational database expansion. An adaptive image slicing model is proposed, and the size of the image slice is adaptively selected according to the adaptive image slicing model. The image slice involves the null value of the image element, and does not involve the stitching method of the DEM slice. In terms of software, mainly commercial GIS software has the function of DEM pyramid slicing. These methods mainly use different sampling algorithms to segment the DEM, and do not implement distributed DEM pyramid slicing.
因此,有必要开发一种基于分布式系统的海量DEM金字塔切片并行构建方法,能够对大规模或海量DEM的金字塔切片进行并行化切分,能够在高性能计算机集群环境下进行分布式计算,减少金字塔构建的时间,提高计算效率,同时可以结合临近平均值方法计算DEM切片边缘的值,以解决相邻切片间的平滑过渡。Therefore, it is necessary to develop a parallel construction method for massive DEM pyramid slices based on a distributed system, which can parallelize and slice large-scale or massive DEM pyramid slices, and can perform distributed computing in a high-performance computer cluster environment to reduce Pyramid construction time improves calculation efficiency. At the same time, the edge value of DEM slice can be calculated in combination with the adjacent average method to solve the smooth transition between adjacent slices.
发明内容Summary of the invention
本发明要解决的技术问题是提供一种基于分布式系统的海量DEM金字塔切片并行构建方法,能够对大规模或海量DEM的金字塔切片进行并行化切分,能够在高性能计算机集群环境下进行分布式计算,减少金字塔构建的时间,提高计算效率,同时可以结合临近平均值方法计算DEM切片边缘的值,以解决相邻切片间的平滑过渡。The technical problem to be solved by the present invention is to provide a method for parallel construction of massive DEM pyramid slices based on a distributed system, which can perform parallel segmentation of large-scale or massive DEM pyramid slices, and can be distributed in a high-performance computer cluster environment Formula calculation reduces the time for pyramid construction and improves calculation efficiency. At the same time, the value of the edge of the DEM slice can be calculated in combination with the adjacent average method to solve the smooth transition between adjacent slices.
为了解决上述技术问题,本发明采用的技术方案是:该基于分布式系统的海量DEM金字塔切片并行构建方法,具体包括以下步骤:In order to solve the above-mentioned technical problems, the technical solution adopted by the present invention is: the parallel construction method of massive DEM pyramid slices based on a distributed system specifically includes the following steps:
S1获取源DEM的元数据Metadata;S1 gets the metadata Metadata of the source DEM;
S2建立所述源DEM的局部坐标系,对所述源DEM进行切分形成若干个可并行计算的切片Tile(切片,就是将一幅DEM切成很多大小一致的小块);并根据所述源DEM的参数计算每一个所述切片Tile的索引值记为Key,以<Key,Tile>键值对为计算单元组成一个保存源DEM的元数据的链表List<Key,Tile>,将<Key,Tile>按照索引值Key分布到不同的计算节点进行计算;S2 establishes the local coordinate system of the source DEM, and divides the source DEM to form a number of parallel-calculated slice tiles (a slice is to cut a DEM into many small pieces of the same size); and according to the Calculate the parameters of the source DEM and record the index value of each sliced Tile as Key. Use the key-value pair of <Key, Tile> as the calculation unit to form a linked list List<Key, Tile> that saves the metadata of the source DEM, and set <Key , Tile> is distributed to different computing nodes for calculation according to the index value Key;
S3根据是否定义了最大层次MaxZoom,进行设置或计算最大层次MaxZoom,再设置需要的输出切片Tile的参数;再根据设定的坐标系和切分规则计算输出切片Tile的参数,所述输出切片Tile的参数包括切片的长、宽、分辨率等;S3 sets or calculates the maximum level MaxZoom according to whether the maximum level MaxZoom is defined, and then sets the required output slice tile parameters; then calculates the output slice tile parameters according to the set coordinate system and segmentation rule, the output slice tile The parameters include slice length, width, resolution, etc.;
S4计算节点并行构建所分配的键值对<Key,Tile>,根据索引值Key合并同一计算节点上的高程值Value;分别根据索引值Key按照所述输出切片Tile的长、宽、分辨率参数计算所对应的切片Tile的外包矩形Extend,计算输入切片Tile中每个网格单元cell的坐标,再根据设定的输出坐标系,计算每个所述网格单元cell在输出坐标系的坐标;根据每个所述网格单元cell的坐标计算相应的所述网格单元cell所在的输出切片Tile的索引值Key,并将其加入一个映射Map 中,组成一个映射Map<Key,List<cell>>,其中Key表示切片的索引值,List表示链表,cell表示网格单元;The S4 computing node constructs the assigned key-value pair <Key, Tile> in parallel, and merges the elevation value Value on the same computing node according to the index value Key; respectively according to the index value Key according to the length, width, and resolution parameters of the output tile Calculate the outer rectangle Extend of the corresponding tile, calculate the coordinates of each grid cell in the input tile, and then calculate the coordinates of each grid cell in the output coordinate system according to the set output coordinate system; Calculate the index value Key of the output slice Tile where the corresponding grid unit cell is located according to the coordinates of each grid unit cell, and add it to a mapping Map to form a mapping Map<Key, List<cell> >, where Key represents the index value of the slice, List represents a linked list, and cell represents a grid unit;
S5将计算节点上相同索引值Key的链表List<cell>合并;根据索引值Key合并所有计算节点上的链表List<cell>,形成一个键值对<Key,List<cell>>;S5 merges the linked lists List<cell> of the same index value Key on the computing nodes; merges the linked lists List<cell> on all computing nodes according to the index value Key to form a key-value pair <Key, List<cell>>;
S6根据输出切片Tile的参数和坐标系,计算输出切片Tile的网格单元cell的坐标,接着根据采样方式从合并的键值对<Key,List<cell>>中计算网格单元cell的高程值Value;S6 calculates the coordinates of the grid unit cell of the output tile tile according to the parameters and coordinate system of the output tile tile, and then calculates the elevation value of the grid unit cell from the merged key-value pair <Key, List<cell>> according to the sampling method Value;
S7利用8邻域算法,修正输出切片Tile边缘的高程值;根据生成的所述链表List<Key,Tile>,循环获取每个切片Tile的四边网格单元cell和与之相邻的8个切片Tile,取相邻切片Tile的网格单元高程值的平均值作为相应网格单元cell的高程值Value,达到切片Tile拼接的平滑;S7 uses the 8-neighbor algorithm to modify the elevation value of the tile edge of the output slice; according to the generated linked list List<Key, Tile>, the four-sided grid cell of each tile and the 8 adjacent slices are obtained cyclically Tile, take the average of the grid cell elevation values of adjacent tile tiles as the elevation value Value of the corresponding grid cell to achieve the smooth splicing of tile tiles;
S8判断当前层次Zoom是否满足终止条件,若满足终止条件,则结束;若不满足终止条件则根据上一级层次计算下一级层次和下一级层次的切片Tile的外包矩形Extend的宽度和高度,计算方法:NZ=CZ–1,W=EW/2 (NZ+1),H=EH/2 (NZ+1),其中NZ表示下一级层次,CZ表示当前层次,EW、EH表示原始DEM的宽度和高度,W、H表示切片Tile的宽度和高度; S8 judges whether the current level Zoom meets the termination condition, if the termination condition is met, it ends; if the termination condition is not met, the width and height of the outer rectangle Extend of the next level and the next level are calculated according to the upper level. , Calculation method: NZ=CZ-1, W=EW/2 (NZ+1) , H=EH/2 (NZ+1) , where NZ represents the next level, CZ represents the current level, and EW and EH represent the original The width and height of the DEM, W and H represent the width and height of the tile;
S9根据上一级层次切片Tile和采样算法,并行计算生成下一级层次切片Tile和索引值Key;根据索引值Key、下一级的层次和切片Tile的参数计算当前层次切片Tile所对应的下一级层次的索引值Key,利用所述采样算法从当前层次切片Tile采样下一级层次切片的高程值,构成下一级层次切片Tile的子切片和索引值Key,在每个节点上合并相同的索引值Key,构成键值对<Key,List<Tile>>;接着根据索引值Key,合并所有节点上相同的索引值Key的切片Tile,组成下一级层次的切片Tile,再执行步骤S7;S9 calculates and generates the next level slice Tile and index value Key in parallel according to the upper level slice tile and sampling algorithm; calculates the next level corresponding to the current level slice tile according to the index value Key, the next level and the parameters of the slice tile. The first-level index value Key uses the sampling algorithm to sample the elevation value of the next level slice from the current level slice tile to form the sub-slices of the next level slice tile and the index value Key, and merge the same on each node The index value Key of, forms the key value pair <Key, List<Tile>>; then according to the index value Key, merge the slice tiles of the same index value Key on all nodes to form the next level of slice tiles, and then perform step S7 ;
S10循环执行步骤S8~S9,直到判断层次Zoom满足终止条件,所述终止条件为:若设定了最小层次MinZoom,则判断当前层次Zoom是否达到设定最小层次MinZoom,若达到,则终止;若未设定最小层次MinZoom,若当前层次zoom小于0,则终止。S10 executes steps S8~S9 in a loop until it is judged that the level Zoom meets the termination condition, the termination condition is: if the minimum level MinZoom is set, then it is judged whether the current level Zoom reaches the set minimum level MinZoom, if it reaches, then terminate; if The minimum level MinZoom is not set, if the current level zoom is less than 0, it will be terminated.
其中Tile表示切片,Key表示切片的索引值,Value表示高程值,List表示链表,cell表示网格单元,Zoom表示层次,Map表示映射,Extend表示源DEM的外包矩形;采用上述技术方案,获取待切分源DEM的元数据Metadata, 作为数据切分和投影转换的基础;建立源DEM左上角为原点,向下向右为正方向的坐标系,根据默认的切片Tile的宽度和高度对源DEM图幅进行切分,根据初步切分的Tile的行列号组成索引值Key,构建一个以索引值Key为键,切片Tile为值的键值对;将键值对分布在不同的计算节点进行以下的计算;根据设定的MaxZoom或计算的MaxZoom,以及设定的输出切片Tile的宽高、坐标系和采样算法,每个计算节点对所分配的输入切片Tile进行切分计算,输出索引值Key和一个包含网格单元cell的链表;接着在每个计算节点上合并相同索引值的网格单元;最后合并不同计算节点上相同的索引值Key的cell,输出多个Key/Value对;根据索引值计算相邻的8个索引值Key,获取相邻切片Tile与当前切片Tile的边缘高程值,将相应的边缘值的平均值作为当前切片Tile的边缘值,达到切片Tile拼接时的平滑;接着循环计算下一级的层次Zoom、切片Tile的宽高等数据,以上一级的输出链表List<Key,Tile>作为输入,计算下一级的链表List<Key,Tile>;循环终止条件是当前层次Zoom小于设定的MinZoom或0;其中采样方式为利用采样算法进行采样,采样算法可以是最邻近像元法,双线性内插法,三次立方卷积法等,均为现有技术。Among them, Tile represents the slice, Key represents the index value of the slice, Value represents the elevation value, List represents the linked list, cell represents the grid unit, Zoom represents the level, Map represents the mapping, and Extend represents the outsourcing rectangle of the source DEM; using the above technical solution, obtain the pending Split the metadata Metadata of the source DEM as the basis for data segmentation and projection conversion; establish a coordinate system with the upper left corner of the source DEM as the origin and the positive direction downward and right, and the source DEM will be adjusted according to the width and height of the default tile The map frame is segmented, and the index value Key is formed according to the row and column numbers of the preliminary segmented Tile, and a key-value pair is constructed with the index value Key as the key and the sliced Tile as the value; the key-value pairs are distributed on different computing nodes as follows Calculation; according to the set MaxZoom or calculated MaxZoom, as well as the set width and height, coordinate system and sampling algorithm of the output tile tile, each computing node performs segmentation calculation on the assigned input tile tile, and outputs the index value Key And a linked list containing grid cells; then merge grid cells with the same index value on each computing node; finally merge cells with the same index value Key on different computing nodes, and output multiple Key/Value pairs; according to the index Calculate the 8 adjacent index values Key, obtain the edge elevation value of the adjacent tile tile and the current tile tile, and use the average of the corresponding edge values as the edge value of the current tile tile to achieve the smoothness of tile tile stitching; then Calculate the next level of level Zoom, the width and height of the sliced Tile, etc., and the output linked list List<Key, Tile> of the previous level as input, calculate the next level of linked list List<Key, Tile>; the loop termination condition is the current level Zoom is less than the set MinZoom or 0; the sampling method is sampling using a sampling algorithm, which can be the nearest neighbor pixel method, bilinear interpolation method, cubic cubic convolution method, etc., all of which are existing technologies.
作为本发明的优选技术方案,所述步骤S1中所述元数据Metadata包括原始分辨率、坐标系,以及在源坐标系下源DEM的外包矩形Extent数据。获取源DEM的Metadata的目的是为了后续计算的需要,这些计算包括将源数据进行初步的切分,以便于后续计算的并行化。As a preferred technical solution of the present invention, the metadata in the step S1 includes the original resolution, the coordinate system, and the extent data of the outer rectangle of the source DEM in the source coordinate system. The purpose of obtaining the metadata of the source DEM is for the needs of subsequent calculations. These calculations include preliminary segmentation of the source data to facilitate the parallelization of subsequent calculations.
作为本发明的优选技术方案,所述步骤S2中建立源DEM的局部坐标系具体为:建立以源DEM左上角为原点,向下向右为正方向的坐标系;根据设定切片Tile的宽和高,将源DEM数据切分为多个切片Tile,为了将源DEM进行初步的切分,以构成链表List<Key,Tile>,其中索引值Key的计算方法:As a preferred technical solution of the present invention, the establishment of the local coordinate system of the source DEM in step S2 is specifically: establishing a coordinate system with the upper left corner of the source DEM as the origin, and downward and right as the positive direction; according to the width of the set tile Hegao, divide the source DEM data into multiple slice tiles, in order to make a preliminary segmentation of the source DEM to form a linked list List<Key, Tile>, in which the calculation method of the index value Key:
Key=C+"_"+R,C=(x-XMin)/TW,R=(y-YMin)/THKey=C+"_"+R,C=(x-XMin)/TW,R=(y-YMin)/TH
其中,C、R表示切片Tile的行列号,x、y表示切片Tile任意一点的切片坐标,XMin表示源DEM的外包矩形Extent的X最小值,YMin表示源DEM的外包矩形Extent的Y最小值,TH是初始切片Tile的高,TW是初始切片Tile的宽。Among them, C and R represent the row and column number of the tile, x and y represent the slice coordinates of any point of the tile, XMin represents the X minimum value of the outer rectangle Extent of the source DEM, and YMin represents the Y minimum value of the outer rectangle Extent of the source DEM. TH is the height of the initial tile, and TW is the width of the initial tile.
作为本发明的优选技术方案,所述步骤S3若未设定层次MaxZoom,则需要计算层次MaxZoom,计算过程是根据源DEM的外包矩形Extend的左下点坐 标和右上点的坐标,并将左下点坐标和右上点的坐标进行投影转换,转换为经纬度坐标,其中左下点坐标是(SLon,SLat),右上点的坐标是(ELon,ELat);接着根据公式计算层次MaxZoom,计算公式如下:As a preferred technical solution of the present invention, if the level MaxZoom is not set in the step S3, the level MaxZoom needs to be calculated. The calculation process is based on the coordinates of the lower left point and the upper right point of the outer envelope rectangle Extend of the source DEM, and the coordinates of the lower left point Perform projection conversion with the coordinates of the upper right point and convert them into latitude and longitude coordinates. The coordinates of the lower left point are (SLon, SLat) and the coordinates of the upper right point are (ELon, ELat); then the level MaxZoom is calculated according to the formula, and the calculation formula is as follows:
dLat=((ELat-SLat)/180.0)·πdLat=((ELat-SLat)/180.0)·π
dLon=((ELon-SLon)/180.0)·πdLon=((ELon-SLon)/180.0)·π
lat1=(SLat/180.0)·πlat1=(SLat/180.0)·π
lat2=(ELat/180.0)·πlat2=(ELat/180.0)·π
a=(sin(dLat/2)·sin(dLat/2))+(sin(dLon/2)·sin(dLon/2)·coslat1·coslat2)a=(sin(dLat/2)·sin(dLat/2))+(sin(dLon/2)·sin(dLon/2)·coslat1·coslat2)
Figure PCTCN2021084081-appb-000001
Figure PCTCN2021084081-appb-000001
MaxZoom=(log(2πR/dist-tilesize)/log(2))MaxZoom=(log(2πR/dist-tilesize)/log(2))
其中,MaxZoom为最大层次,dLat表示纬度差,dLon表示经度差,lat1表示SLat的弧度,lat2表示ELat的弧度,a表示计算的中间值,dist表示两点的距离,tilesize表示Tile设置的最大边长,R表示WGS84椭球的长半轴,R=637817。计算输出切片Tile的Extend,需要适当的扩大,目的是为了避免输出切片Tile拼接不会出现裂缝等问题。Among them, MaxZoom is the maximum level, dLat is the difference in latitude, dLon is the difference in longitude, lat1 is the radian of SLat, lat2 is the radian of ELat, a is the calculated intermediate value, dist is the distance between two points, and tilesize is the maximum side set by the Tile. Long, R represents the semi-major axis of the WGS84 ellipsoid, R=637817. Calculating the Extend of the output slice tile needs to be expanded appropriately, in order to avoid problems such as cracks in the output slice tile splicing.
作为本发明的优选技术方案,所述步骤S4中网格单元cell=<x,y,Value>,其中x,y是在切片Tile的坐标,Value是高程值。As a preferred technical solution of the present invention, in the step S4, the grid unit cell=<x, y, Value>, where x and y are the coordinates of the tile in the slice, and Value is the elevation value.
作为本发明的优选技术方案,所述步骤S4并行计算输入切片Tile,根据输出切片Tile的参数将输入切片Tile的DEM值划分到不同的输出切片Tile中;其中首先根据输入切片Tile的索引值Key计算Tile的外包矩形Extend,计算公式:As a preferred technical solution of the present invention, the step S4 calculates the input slice tiles in parallel, and divides the DEM value of the input slice Tile into different output slice tiles according to the parameters of the output slice Tile; among them, first, according to the index value of the input slice Tile, Key Calculate the Extend of the tile, the calculation formula:
MinX=ExMinX+col·WMinX=ExMinX+col·W
MinY=ExMinY+row·HMinY=ExMinY+row·H
MaxX=ExMinX+(col+1)·WMaxX=ExMinX+(col+1)·W
MaxY=ExMinY+(row+1)·HMaxY=ExMinY+(row+1)·H
其中,MinX、MinY、MaxX、MaxY分别表示外包矩形Extend的最小最大XY坐标值,col、row是输入切片Tile的行列号,ExMinX、ExMinY表示源DEM的外包矩形Extend的最小的X、Y坐标值,H表示切片Tile的高,W表示切片Tile的宽。Among them, MinX, MinY, MaxX, MaxY respectively represent the minimum and maximum XY coordinate values of the outer rectangle Extend, col, row are the row and column numbers of the input slice Tile, and ExMinX and ExMinY represent the minimum X and Y coordinate values of the outer rectangle Extend of the source DEM , H represents the height of the tile, and W represents the width of the tile.
作为本发明的优选技术方案,所述步骤S7利用8邻域算法,修正切片Tile边缘的高程值Value时,对输出的链表List<Key,Tile>并行计算相邻的切片 Tile,取四周除交点外的相邻网格单元cell值,并对上下或左右的cell取值,将取到的cell值取平均值作为指定网格单元cell的高程值Value;四个角点的高程值的计算是取切片Tile的相邻的另外的三个切片Tile与相应角点的值,并取平均值作为相应网格单元cell的高程值Value。As a preferred technical solution of the present invention, when the step S7 uses the 8-neighbor algorithm to correct the elevation value Value of the edge of the tile, the output linked list List<Key, Tile> is calculated in parallel for the adjacent tile tiles, and the intersection is divided by the four sides. The cell value of the adjacent grid cell outside, and the upper and lower or left and right cells are selected, and the average value of the obtained cell value is taken as the elevation value of the specified grid cell; the calculation of the elevation value of the four corner points is Take the values of the other three adjacent tiles and the corresponding corner points of the tile, and take the average value as the elevation value of the corresponding grid cell.
与现有技术相比,本发明具有的有益效果为:该基于分布式系统的海量DEM金字塔切片并行构建方法具有以下优点:利用高性能计算集群,实现了对大规模DEM数据构建DEM金字塔切片的并行化,可减少DEM金字塔构建的时间,提高计算效率;对切片的边缘高程值进行8邻域平滑处理,以避免DEM可视化和分析计算的平滑。Compared with the prior art, the present invention has the beneficial effects that: the distributed system-based parallel construction method for massive DEM pyramid slices has the following advantages: using high-performance computing clusters, the construction of DEM pyramid slices for large-scale DEM data is realized. Parallelization can reduce the time for DEM pyramid construction and improve calculation efficiency; 8-neighbor smoothing is performed on the edge elevation value of the slice to avoid the smoothing of DEM visualization and analysis calculation.
附图说明Description of the drawings
图1为本发明的基于分布式系统的海量DEM金字塔切片并行构建方法的工作流程图;Fig. 1 is a working flow chart of the method for parallel construction of massive DEM pyramid slices based on a distributed system of the present invention;
图2为本发明的基于分布式系统的海量DEM金字塔切片并行构建方法的局部坐标系切分DEM示意图;2 is a schematic diagram of the local coordinate system segmentation DEM of the method for parallel construction of massive DEM pyramid slices based on the distributed system of the present invention;
图3为本发明的基于分布式系统的海量DEM金字塔切片并行构建方法的单个计算节点计算示意图;3 is a schematic diagram of the calculation of a single computing node of the method for parallel construction of massive DEM pyramid slices based on a distributed system of the present invention;
图4为本发明的基于分布式系统的海量DEM金字塔切片并行构建方法的多个计算节点合并示意图;4 is a schematic diagram of the merging of multiple computing nodes of the method for parallel construction of massive DEM pyramid slices based on the distributed system of the present invention;
图5为本发明的基于分布式系统的海量DEM金字塔切片并行构建方法边缘平滑示意图;5 is a schematic diagram of edge smoothing of the method for parallel construction of massive DEM pyramid slices based on a distributed system of the present invention;
图6为本发明的基于分布式系统的海量DEM金字塔切片并行构建方法可视化图;6 is a visualization diagram of the method for parallel construction of massive DEM pyramid slices based on a distributed system of the present invention;
其中:图(a)为17级图;图(b)为17、16级镶嵌显示图;图(c)为17级的Wireframe图;图(d)为17、16级镶嵌Wireframe图。Among them: Picture (a) is a 17-level picture; Picture (b) is a 17-level and 16-level mosaic display picture; Picture (c) is a 17-level Wireframe picture; Picture (d) is a 17-level and 16-level mosaic Wireframe picture.
具体实施方式Detailed ways
下面将结合本发明的实施例图中的附图,对本发明实施例中的技术方案进行清楚、完整的描述。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
实施例:如图1~6所示,该基于分布式系统的海量DEM金字塔切片并行构建方法,具体包括以下步骤:Embodiment: As shown in Figures 1 to 6, the parallel construction method of massive DEM pyramid slices based on a distributed system specifically includes the following steps:
其中Tile表示切片,Key表示切片的索引值,Value表示高程值,List表示链表,cell表示网格单元,zoom表示层次,Map表示映射,Extend表示源DEM的外包矩形,<Key,Tile>表示键值对;Tile represents the slice, Key represents the index value of the slice, Value represents the elevation value, List represents the linked list, cell represents the grid unit, zoom represents the level, Map represents the mapping, Extend represents the outsourcing rectangle of the source DEM, and <Key, Tile> represents the key Value pair
S1使用分辨率30米的源DEM数据和一部分高精度源DEM数据,数据格式是tif,设定的坐标系为WGS84;分别研发基于Flink分布式平台的金字塔切片程序;S1 uses source DEM data with a resolution of 30 meters and a part of high-precision source DEM data, the data format is tif, and the set coordinate system is WGS84; the pyramid slicing program based on the Flink distributed platform is developed separately;
获取全国30米源DEM的元数据Metadata,包括原始的分辨率、坐标系WGS84以及Extend;Obtain the metadata of the national 30-meter DEM, including the original resolution, coordinate system WGS84 and Extend;
S2对所述输入源DEM数据建立局部坐标系,设定初始划分切片的高和宽均为126(网格),利用滑动窗口方法对源数据进行切分,接着根据Tile在局部坐标系的行列号计算Key,构建一系列的<Key,Tile>键值对,按照Flink的算法将键值对数据分布到不同的计算节点上进行计算;建立以源DEM左上角为原点,向下向右为正方向的坐标系;其中索引值Key的计算方法:S2 establishes a local coordinate system for the input source DEM data, sets the height and width of the initial division slice to be 126 (grid), uses the sliding window method to segment the source data, and then divides the source data according to the ranks of the tiles in the local coordinate system Calculate the Key, construct a series of <Key, Tile> key-value pairs, and distribute the key-value pair data to different computing nodes according to Flink’s algorithm for calculation; the establishment takes the upper left corner of the source DEM as the origin, and downwards to the right as The coordinate system in the positive direction; the calculation method of the index value Key:
Key=C+"_"+R,C=(x-XMin)/TW,R=(y-YMin)/THKey=C+"_"+R,C=(x-XMin)/TW,R=(y-YMin)/TH
其中,C、R表示切片Tile的行列号,x、y表示切片Tile任意一点的切片坐标,XMin表示源DEM的外包矩形Extent的X最小值,YMin表示源DEM的外包矩形Extent的Y最小值,TH是初始切片Tile的高,TW是初始切片Tile的宽;Among them, C and R represent the row and column number of the tile, x and y represent the slice coordinates of any point of the tile, XMin represents the X minimum value of the outer rectangle Extent of the source DEM, and YMin represents the Y minimum value of the outer rectangle Extent of the source DEM. TH is the height of the initial tile, and TW is the width of the initial tile;
S3根据是否定义了最大层次MaxZoom,进行设置或计算最大层次MaxZoom,再根据设定的坐标系和切分规则计算输出切片Tile的参数;所述输出切片Tile的参数包括切片的长、宽、分辨率等;若未设定最大层次MaxZoom,则需要计算最大层次MaxZoom,计算过程是根据源DEM的外包矩形Extend的左下点坐标和右上点的坐标,并将左下点坐标和右上点的坐标进行投影转换,转换为经纬度坐标,其中左下点坐标是(SLon,SLat),右上点的坐标是(ELon,ELat);接着根据公式计算最大层次MaxZoom,计算公式如下:S3 sets or calculates the maximum level MaxZoom according to whether the maximum level MaxZoom is defined, and then calculates the parameters of the output slice tile according to the set coordinate system and segmentation rule; the parameters of the output slice tile include the length, width, and resolution of the slice If the maximum level MaxZoom is not set, the maximum level MaxZoom needs to be calculated. The calculation process is based on the coordinates of the lower left point and the upper right point of the outer rectangle Extend of the source DEM, and the coordinates of the lower left point and the upper right point are projected Convert to latitude and longitude coordinates, where the coordinates of the lower left point are (SLon, SLat), and the coordinates of the upper right point are (ELon, ELat); then the maximum level MaxZoom is calculated according to the formula, and the calculation formula is as follows:
dLat=((ELat-SLat)/180.0)·πdLat=((ELat-SLat)/180.0)·π
dLon=((ELon-SLon)/180.0)·πdLon=((ELon-SLon)/180.0)·π
lat1=(SLat/180.0)·πlat1=(SLat/180.0)·π
lat2=(ELat/180.0)·πlat2=(ELat/180.0)·π
a=(sin(dLat/2)·sin(dLat/2))+(sin(dLon/2)·sin(dLon/2)·coslat1·coslat2)a=(sin(dLat/2)·sin(dLat/2))+(sin(dLon/2)·sin(dLon/2)·coslat1·coslat2)
Figure PCTCN2021084081-appb-000002
Figure PCTCN2021084081-appb-000002
MaxZoom=(log(2πR/dist-tilesize)/log(2))MaxZoom=(log(2πR/dist-tilesize)/log(2))
其中,MaxZoom为最大层次,dLat表示纬度差,dLon表示经度差,lat1表示SLat的弧度,lat2表示ELat的弧度,a表示计算的中间值,dist表示两点的距离,tilesize表示Tile设置的最大边长,R表示WGS84椭球的长半轴,R=637817;Among them, MaxZoom is the maximum level, dLat is the difference in latitude, dLon is the difference in longitude, lat1 is the radian of SLat, lat2 is the radian of ELat, a is the calculated intermediate value, dist is the distance between two points, and tilesize is the maximum side set by the Tile. Long, R represents the semi-major axis of the WGS84 ellipsoid, R=637817;
计算输出切片Tile的Extend,需要适当的扩大,目的是为了避免输出切片Tile拼接不会出现裂缝等问题;所述步骤S3中设置输出切片Tile的参数为:宽高均为65(网格)、坐标系为WGS84、索引值Key的命名遵循TMS标准;To calculate the Extend of the output slice tile, it needs to be enlarged appropriately, in order to avoid problems such as cracks in the output slice tile splicing; the parameters of the output slice tile set in step S3 are: width and height are 65 (grid), The coordinate system is WGS84, and the naming of the index value Key follows the TMS standard;
S4计算节点并行构建所分配的键值对<Key,Tile>,根据索引值Key合并同一计算节点上的高程值Value;分别根据索引值Key按照所述输出切片Tile的长、宽、分辨率参数计算所对应的切片Tile的外包矩形Extend,计算输入切片Tile中每个网格单元cell的坐标,对初步切分的Tile分别计算;首先根据索引值Key计算Tile的Extend;计算输入切片Tile中每个网格单元cell的坐标,其中cell=<x,y,Value>,其中x,y是在Tile的坐标,Value是高程值的坐标,根据设定的输出坐标系WGS84,计算cell在输出坐标系的坐标,根据计算结果计算此cell所在的输出切片Tile的索引值Key,并将其加入Map中,组成一个Map<Key,List<cell>>;将计算节点上相同索引值Key的List<cell>合并,原理见图3所示;所述步骤S4并行计算输入切片Tile,根据输出切片Tile的参数将输入切片Tile的DEM值划分到不同的输出切片Tile中;其中首先根据输入切片Tile的索引值Key计算Tile的外包矩形Extend,计算公式:The S4 computing node constructs the assigned key-value pair <Key, Tile> in parallel, and merges the elevation value Value on the same computing node according to the index value Key; respectively according to the index value Key according to the length, width, and resolution parameters of the output tile Calculate the outer rectangle Extend of the corresponding sliced Tile, calculate the coordinates of each grid cell in the input slice Tile, and calculate the initial segmented tiles separately; first calculate the Extend of the tile according to the index value Key; calculate each tile in the input slice The coordinates of a grid cell, where cell=<x,y,Value>, where x and y are the coordinates of the Tile, and Value is the coordinates of the elevation value. According to the set output coordinate system WGS84, calculate the output coordinates of the cell According to the calculation result, calculate the index value Key of the output slice Tile where this cell is located, and add it to the Map to form a Map<Key, List<cell>>; calculate the List< of the same index value Key on the node cell>combine, the principle is shown in Figure 3; the step S4 calculates the input slice Tile in parallel, and divides the DEM value of the input slice Tile into different output slice tiles according to the parameters of the output slice Tile; among them, first according to the input slice Tile The index value Key calculates the outer rectangle Extend of the Tile, the calculation formula is:
MinX=ExMinX+col·WMinX=ExMinX+col·W
MinY=ExMinY+row·HMinY=ExMinY+row·H
MaxX=ExMinX+(col+1)·WMaxX=ExMinX+(col+1)·W
MaxY=ExMinY+(row+1)·HMaxY=ExMinY+(row+1)·H
其中,MinX、MinY、MaxX、MaxY分别表示外包矩形Extend的最小最大XY坐标值,col、row是输入切片Tile的行列号,ExMinX、ExMinY表示源DEM的外包矩形Extend的最小的X、Y坐标值,H表示切片Tile的高,W表示切片Tile的宽;Among them, MinX, MinY, MaxX, MaxY respectively represent the minimum and maximum XY coordinate values of the outer rectangle Extend, col, row are the row and column numbers of the input slice Tile, and ExMinX and ExMinY represent the minimum X and Y coordinate values of the outer rectangle Extend of the source DEM , H represents the height of the tile, and W represents the width of the tile;
S5根据索引值Key合并所有计算节点上的List<cell>;由于输入切片Tile分布在不同的计算节点上,而输出切片Tile可能包含不同的输入切片Tile,也就是说,输出切片Tile的数据可能在不同的计算节点,需要将这些数据拉到同一个节点上进行合并,也就是Flink的Reduce操作,原理见图4所示。S5 merges List<cell> on all computing nodes according to the index value Key; since the input slice tiles are distributed on different computing nodes, and the output slice tiles may contain different input slice tiles, that is, the data of the output slice tiles may be In different computing nodes, these data need to be pulled to the same node for merging, which is Flink's Reduce operation. The principle is shown in Figure 4.
S6根据输出切片Tile的参数和坐标系,计算输出切片Tile的网格单元cell的坐标,使用设置的采样方法,从合并的<Key,List<cell>>中计算cell的高程值,本实施例中使用的是最邻近采样算法;S6 According to the parameters and coordinate system of the output tile, calculate the coordinates of the grid cell of the output tile, and use the set sampling method to calculate the elevation value of the cell from the merged <Key, List<cell>>, this embodiment The nearest neighbor sampling algorithm is used in;
S7利用8邻域算法,修正切片Tile边缘的高程值Value;根据生成的所述链表List<Key,Tile>,循环获取每个切片Tile的四边网格单元cell和与之相邻的8个切片Tile,取相邻切片Tile的网格单元高程值的平均值作为相应网格单元cell的高程值Value,达到切片Tile拼接的平滑;根据输出的键值对<Key,Tile>,根据索引值Key的TMS命名规则计算每个切片Tile相邻的8个切片Tile,取相邻Tile的cell值,并作平均值作为相应cell的值,达到Tile拼接的平滑;原理示意见图5所示;S7 uses the 8-neighborhood algorithm to modify the elevation value Value of the tile edge; according to the generated linked list List<Key, Tile>, it cyclically obtains the four-sided grid cell of each tile tile and the 8 adjacent tiles. Tile, take the average of the grid unit elevation values of adjacent tile tiles as the elevation value Value of the corresponding grid unit cell to achieve smooth tile tile splicing; according to the output key-value pair <Key, Tile>, according to the index value Key According to the TMS naming rule, calculate the 8 adjacent tiles of each tile, take the cell value of the adjacent tiles, and use the average value as the value of the corresponding cell to achieve smooth tile splicing; the principle diagram is shown in Figure 5;
S8判断当前层次Zoom是否满足终止条件,若满足终止条件,则结束;若不满足终止条件则根据上一级层次计算下一级层次和下一级层次的切片Tile的外包矩形Extend的宽度和高度,计算方法:NZ=CZ–1,W=EW/2 (NZ+1),H=EH/2 (NZ+1),其中NZ表示下一级层次,CZ表示当前层次,EW、EH表示原始DEM的宽度和高度,W、H表示切片Tile的宽度和高度; S8 judges whether the current level Zoom meets the termination condition, if the termination condition is met, it ends; if the termination condition is not met, the width and height of the outer rectangle Extend of the next level and the next level are calculated according to the upper level. , Calculation method: NZ=CZ-1, W=EW/2 (NZ+1) , H=EH/2 (NZ+1) , where NZ represents the next level, CZ represents the current level, and EW and EH represent the original The width and height of the DEM, W and H represent the width and height of the tile;
S9根据上一级层次切片Tile和采样算法,并行计算生成下一级层次切片Tile和索引值Key;根据索引值Key、下一级的层次和切片Tile的参数计算当前层次切片Tile所对应的下一级层次的索引值Key,利用所述采样算法从当前层次切片Tile采样下一级层次切片的高程值,构成下一级层次切片Tile的子切片和索引值Key,在每个节点上合并相同的索引值Key,构成键值对<Key,List<Tile>>;接着根据索引值Key,合并所有节点上相同的索引值Key的切片 Tile,组成下一级层次的切片Tile,再执行步骤S7;本实施例中使用的是最邻近采样算法;S9 calculates and generates the next level slice Tile and index value Key in parallel according to the upper level slice tile and sampling algorithm; calculates the next level corresponding to the current level slice tile according to the index value Key, the next level and the parameters of the slice tile. The first-level index value Key uses the sampling algorithm to sample the elevation value of the next level slice from the current level slice tile to form the sub-slices of the next level slice tile and the index value Key, and merge the same on each node The index value Key of, forms the key value pair <Key, List<Tile>>; then according to the index value Key, merge the slice tiles of the same index value Key on all nodes to form the next level of slice tiles, and then perform step S7 ; In this embodiment, the nearest neighbor sampling algorithm is used;
S10循环执行步骤S8~S9,计算下一级的List<Key,Tile>,直到判断当前层次Zoom满足终止条件,所述终止条件为:若设定了最小层次MinZoom,则判断当前层次Zoom是否达到设定最小层次MinZoom,若达到,则终止;若未设定最小层次MinZoom,则当前层次Zoom小于0,则终止。S10 cyclically executes steps S8~S9, calculating the next level of List<Key, Tile>, until it is judged that the current level of Zoom meets the termination condition, the termination condition is: if the minimum level of MinZoom is set, it is judged whether the current level of Zoom has reached Set the minimum level of MinZoom, if it reaches the minimum level, then terminate; if the minimum level of MinZoom is not set, the current level of Zoom is less than 0, then terminate.
以上所述仅为本发明的较佳实施例而已,并不用于限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the present invention. Within the scope of protection.

Claims (7)

  1. 一种基于分布式系统的海量DEM金字塔切片并行构建方法,其特征在于,具体包括以下步骤:A method for parallel construction of massive DEM pyramid slices based on a distributed system is characterized in that it specifically includes the following steps:
    S1获取源DEM的元数据Metadata;S1 gets the metadata Metadata of the source DEM;
    S2建立所述源DEM的局部坐标系,对所述源DEM进行切分形成若干个可并行计算的切片Tile;并根据所述源DEM的参数计算每一个所述切片Tile的索引值记为Key,以<Key,Tile>键值对为计算单元组成一个保存源DEM的元数据的链表List<Key,Tile>,将<Key,Tile>按照索引值Key分布到不同的计算节点进行计算;S2 Establish the local coordinate system of the source DEM, divide the source DEM to form several slice tiles that can be calculated in parallel; and calculate the index value of each slice tile as Key according to the parameters of the source DEM , Use the <Key, Tile> key-value pair as the computing unit to form a linked list List<Key, Tile> that saves the metadata of the source DEM, and distribute the <Key, Tile> to different computing nodes according to the index value Key for calculation;
    S3根据是否定义了最大层次MaxZoom,进行设置或计算最大层次MaxZoom,设置需要的输出切片Tile的参数;根据设定的坐标系和切分规则计算输出切片Tile的参数;S3 sets or calculates the maximum level MaxZoom according to whether the maximum level MaxZoom is defined, and sets the required output slice tile parameters; calculates the output slice tile parameters according to the set coordinate system and segmentation rules;
    S4计算节点并行构建所分配的键值对<Key,Tile>,根据索引值Key合并同一计算节点上的高程值Value;分别根据索引值Key按照所述输出切片Tile的长、宽、分辨率参数计算所对应的切片Tile的外包矩形Extend,计算输入切片Tile中每个网格单元cell的坐标,再根据设定的输出坐标系,计算每个所述网格单元cell在输出坐标系的坐标;根据每个所述网格单元cell的坐标计算相应的所述网格单元cell所在的输出切片Tile的索引值Key,并将其加入一个映射Map中,组成一个映射Map<Key,List<cell>>;The S4 computing node constructs the assigned key-value pair <Key, Tile> in parallel, and merges the elevation value Value on the same computing node according to the index value Key; respectively according to the index value Key according to the length, width, and resolution parameters of the output tile Calculate the outer rectangle Extend of the corresponding tile, calculate the coordinates of each grid cell in the input tile, and then calculate the coordinates of each grid cell in the output coordinate system according to the set output coordinate system; Calculate the index value Key of the output slice Tile where the corresponding grid unit cell is located according to the coordinates of each grid unit cell, and add it to a mapping Map to form a mapping Map<Key, List<cell> >;
    S5将计算节点上相同索引值Key的链表List<cell>合并;根据索引值Key合并所有计算节点上的链表List<cell>,形成一个键值对<Key,List<cell>>;S5 merges the linked lists List<cell> of the same index value Key on the computing nodes; merges the linked lists List<cell> on all computing nodes according to the index value Key to form a key-value pair <Key, List<cell>>;
    S6根据输出切片Tile的参数和坐标系,计算输出切片Tile的网格单元cell的坐标,接着根据采样方式从合并的键值对<Key,List<cell>>中计算网格单元cell的高程值Value;S6 calculates the coordinates of the grid unit cell of the output tile tile according to the parameters and coordinate system of the output tile tile, and then calculates the elevation value of the grid unit cell from the merged key-value pair <Key, List<cell>> according to the sampling method Value;
    S7利用8邻域算法,修正输出切片Tile边缘的高程值;根据生成的所述链表List<Key,Tile>,循环获取每个切片Tile的四边网格单元cell和与之相邻的8个切片Tile,取相邻切片Tile的网格单元高程值的平均值作为相应网格单元cell的高程值Value,达到切片Tile拼接的平滑;S7 uses the 8-neighbor algorithm to modify the elevation value of the tile edge of the output slice; according to the generated linked list List<Key, Tile>, the four-sided grid cell of each tile and the 8 adjacent slices are obtained cyclically Tile, take the average of the grid cell elevation values of adjacent tile tiles as the elevation value Value of the corresponding grid cell to achieve the smooth splicing of tile tiles;
    S8判断当前层次Zoom是否满足终止条件,若满足终止条件,则结束;若不满足终止条件则根据上一级层次计算下一级层次和下一级层次的切片Tile的外包 矩形Extend的宽度和高度,计算方法:NZ=CZ–1,W=EW/2 (NZ+1),H=EH/2 (NZ+1),其中NZ表示下一级层次,CZ表示当前层次,EW、EH表示原始DEM的宽度和高度,W、H表示切片Tile的宽度和高度; S8 judges whether the current level Zoom meets the termination condition, if the termination condition is met, it ends; if the termination condition is not met, the width and height of the outer rectangle Extend of the next level and the next level are calculated according to the upper level. , Calculation method: NZ=CZ-1, W=EW/2 (NZ+1) , H=EH/2 (NZ+1) , where NZ represents the next level, CZ represents the current level, and EW and EH represent the original The width and height of the DEM, W and H represent the width and height of the tile;
    S9根据上一级层次切片Tile和采样算法,并行计算生成下一级层次切片Tile和索引值Key;根据索引值Key、下一级的层次和切片Tile的参数计算当前层次切片Tile所对应的下一级层次的索引值Key,利用所述采样算法从当前层次切片Tile采样下一级层次切片的高程值,构成下一级层次切片Tile的子切片和索引值Key,在每个节点上合并相同的索引值Key,构成键值对<Key,List<Tile>>;接着根据索引值Key,合并所有节点上相同的索引值Key的切片Tile,组成下一级层次的切片Tile,再执行步骤S7;S9 calculates and generates the next level slice Tile and index value Key in parallel according to the upper level slice tile and sampling algorithm; calculates the next level corresponding to the current level slice tile according to the index value Key, the next level and the parameters of the slice tile. The first-level index value Key uses the sampling algorithm to sample the elevation value of the next level slice from the current level slice tile to form the sub-slices of the next level slice tile and the index value Key, and merge the same on each node The index value Key of, forms the key value pair <Key, List<Tile>>; then according to the index value Key, merge the slice tiles of the same index value Key on all nodes to form the next level of slice tiles, and then perform step S7 ;
    S10循环执行步骤S8~S9,直到判断层次Zoom满足终止条件,所述终止条件为:若设定了层次MinZoom,则判断当前层次Zoom是否达到设定层次MinZoom,若达到,则终止;若未设定层次MinZoom,若当前层次zoom小于0,则终止。S10 cyclically executes steps S8~S9 until it is judged that the level Zoom meets the termination condition, the termination condition is: if the level MinZoom is set, then it is judged whether the current level Zoom reaches the set level MinZoom, if it is reached, terminate; if not set Set the level MinZoom, if the current level zoom is less than 0, it will terminate.
  2. 根据权利要求1所述的基于分布式系统的海量DEM金字塔切片并行构建方法,其特征在于,所述步骤S1中所述元数据Metadata包括原始分辨率、坐标系,以及在原坐标系下DEM的外包矩形Extent数据。The method for parallel construction of massive DEM pyramid slices based on a distributed system according to claim 1, wherein the metadata in step S1 includes original resolution, coordinate system, and outsourced DEM in the original coordinate system Rectangular Extent data.
  3. 根据权利要求1所述的基于分布式系统的海量DEM金字塔切片并行构建方法,其特征在于,所述步骤S2中建立源DEM的局部坐标系具体为:建立以源DEM左上角为原点,向下向右为正方向的坐标系;根据设定切片Tile的宽和高,将源DEM数据切分为多个切片Tile,为了将源DEM进行初步的切分,以构成链表List<Key,Tile>,其中索引值Key的计算方法:The method for constructing massive DEM pyramid slices in parallel based on a distributed system according to claim 1, wherein the establishment of the local coordinate system of the source DEM in step S2 is specifically: establishing the origin with the upper left corner of the source DEM as the origin, and downward The coordinate system in the positive direction is to the right; according to the width and height of the set tile tiles, the source DEM data is divided into multiple tile tiles, in order to perform preliminary segmentation of the source DEM to form a linked list List<Key, Tile> , The calculation method of the index value Key:
    Key=C+"_"+R,C=(x-XMin)/TW,R=(y-YMin)/THKey=C+"_"+R,C=(x-XMin)/TW,R=(y-YMin)/TH
    其中,C、R表示切片Tile的行列号,x、y表示切片Tile任意一点的切片坐标,XMin表示源DEM的外包矩形Extent的X最小值,YMin表示源DEM的外包矩形Extent的Y最小值,TH是初始切片Tile的高,TW是初始切片Tile的宽。Among them, C and R represent the row and column number of the tile, x and y represent the slice coordinates of any point of the tile, XMin represents the X minimum value of the outer rectangle Extent of the source DEM, and YMin represents the Y minimum value of the outer rectangle Extent of the source DEM. TH is the height of the initial tile, and TW is the width of the initial tile.
  4. 根据权利要求3所述的基于分布式系统的海量DEM金字塔切片并行构建方法,其特征在于,所述步骤S3若未设定层次MaxZoom,则需要计算层次MaxZoom,计算过程是根据源DEM的外包矩形Extend的左下点坐标和右上点的坐标,并将左下点坐标和右上点的坐标进行投影转换,转换为经纬度坐标, 其中左下点坐标是(SLon,SLat),右上点的坐标是(ELon,ELat);接着根据公式计算层次MaxZoom,计算公式如下:The method for constructing massive DEM pyramid slices in parallel based on a distributed system according to claim 3, characterized in that if the level MaxZoom is not set in the step S3, the level MaxZoom needs to be calculated, and the calculation process is based on the outsourcing rectangle of the source DEM Extend the coordinates of the lower left point and the upper right point, and transform the coordinates of the lower left point and the upper right point into latitude and longitude coordinates. The coordinates of the lower left point are (SLon, SLat) and the coordinates of the upper right point are (ELon, ELat ); Then calculate the level MaxZoom according to the formula, the calculation formula is as follows:
    dLat=((ELat-SLat)/180.0)·πdLat=((ELat-SLat)/180.0)·π
    dLon=((ELon-SLon)/180.0)·πdLon=((ELon-SLon)/180.0)·π
    lat1=(SLat/180.0)·πlat1=(SLat/180.0)·π
    lat2=(ELat/180.0)·πlat2=(ELat/180.0)·π
    a=(sin(dLat/2)·sin(dLat/2))+(sin(dLon/2)·sin(dLon/2)·coslat1·coslat2)a=(sin(dLat/2)·sin(dLat/2))+(sin(dLon/2)·sin(dLon/2)·coslat1·coslat2)
    Figure PCTCN2021084081-appb-100001
    Figure PCTCN2021084081-appb-100001
    MaxZoom=(log(2πR/dist-tilesize)/log(2))MaxZoom=(log(2πR/dist-tilesize)/log(2))
    其中,MaxZoom为最大层次,dLat表示纬度差,dLon表示经度差,lat1表示SLat的弧度,lat2表示ELat的弧度,a表示计算的中间值,dist表示两点的距离,tilesize表示Tile设置的最大边长,R表示WGS84椭球的长半轴,R=637817。Among them, MaxZoom is the maximum level, dLat is the difference in latitude, dLon is the difference in longitude, lat1 is the radian of SLat, lat2 is the radian of ELat, a is the calculated intermediate value, dist is the distance between two points, and tilesize is the maximum side set by the Tile. Long, R represents the semi-major axis of the WGS84 ellipsoid, R=637817.
  5. 根据权利要求3所述的基于分布式系统的海量DEM金字塔切片并行构建方法,其特征在于,所述步骤S4中网格单元cell=<x,y,Value>,其中x,y是在切片Tile的坐标,Value是高程值。The method for constructing massive DEM pyramid slices in parallel based on a distributed system according to claim 3, wherein the grid unit cell=<x,y,Value> in the step S4, wherein x,y are in the tile The coordinates, Value is the elevation value.
  6. 根据权利要求5所述的基于分布式系统的海量DEM金字塔切片并行构建方法,其特征在于,所述步骤S4并行计算输入切片Tile,根据输出切片Tile的参数将输入切片Tile的DEM值划分到不同的输出切片Tile中;其中首先根据输入切片Tile的索引值Key计算Tile的外包矩形Extend,计算公式:The method for constructing massive DEM pyramid slices in parallel based on a distributed system according to claim 5, wherein the step S4 calculates the input slice tiles in parallel, and divides the DEM values of the input slice tiles into different values according to the parameters of the output slice tiles. In the output slice of Tile; among them, first calculate the outer rectangle Extend of the Tile according to the index value Key of the input slice Tile, the calculation formula:
    MinX=ExMinX+col·WMinX=ExMinX+col·W
    MinY=ExMinY+row·HMinY=ExMinY+row·H
    MaxX=ExMinX+(col+1)·WMaxX=ExMinX+(col+1)·W
    MaxY=ExMinY+(row+1)·HMaxY=ExMinY+(row+1)·H
    其中,MinX、MinY、MaxX、MaxY分别表示外包矩形Extend的最小最大XY坐标值,col、row是输入切片Tile的行列号,ExMinX、ExMinY表示源DEM的外包矩形Extend的最小的X、Y坐标值,H表示切片Tile的高,W表示切片Tile的宽。Among them, MinX, MinY, MaxX, MaxY respectively represent the minimum and maximum XY coordinate values of the outer rectangle Extend, col, row are the row and column numbers of the input slice Tile, and ExMinX and ExMinY represent the minimum X and Y coordinate values of the outer rectangle Extend of the source DEM , H represents the height of the tile, and W represents the width of the tile.
  7. 根据权利要求5所述的基于分布式系统的海量DEM金字塔切片并行构建方法,其特征在于,所述步骤S7利用8邻域算法,修正切片Tile边缘的高程值Value时,对输出的链表List<Key,Tile>并行计算相邻的切片Tile,取四周除 交点外的相邻网格单元cell值,并对上下或左右的cell取值,将取到的cell值取平均值作为指定网格单元cell的高程值Value;四个角点的高程值的计算是取切片Tile的相邻的另外的三个切片Tile与相应角点的值,并取平均值作为相应网格单元cell的高程值Value。The method for parallel construction of massive DEM pyramid slices based on a distributed system according to claim 5, wherein the step S7 uses the 8-neighbor algorithm to correct the elevation value Value of the tile edge of the slice, and the output linked list List< Key, Tile> Calculate adjacent slice tiles in parallel, take the cell values of adjacent grid cells except for the intersection point, and take the values of the upper and lower or left and right cells, and take the average of the obtained cell values as the specified grid cell The elevation value Value of the cell; the elevation value of the four corner points is calculated by taking the values of the other three adjacent tiles and the corresponding corner points of the tile tile, and taking the average value as the elevation value of the corresponding grid cell cell .
PCT/CN2021/084081 2020-04-09 2021-03-30 Distributed system-based concurrent construction method for massive dem pyramid tiles WO2021204026A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010271605.X 2020-04-09
CN202010271605.XA CN111243091B (en) 2020-04-09 2020-04-09 Massive DEM pyramid slice parallel construction method based on distributed system

Publications (1)

Publication Number Publication Date
WO2021204026A1 true WO2021204026A1 (en) 2021-10-14

Family

ID=70871339

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/084081 WO2021204026A1 (en) 2020-04-09 2021-03-30 Distributed system-based concurrent construction method for massive dem pyramid tiles

Country Status (2)

Country Link
CN (1) CN111243091B (en)
WO (1) WO2021204026A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302488A (en) * 2023-01-17 2023-06-23 重庆市地理信息和遥感应用中心(重庆市测绘产品质量检验测试中心) Multi-process automatic identification conversion method for topographic map data coordinates
CN117874301A (en) * 2024-03-11 2024-04-12 浙江省气象台 Method for processing, storing and calling pyramid slice based on grid data
CN117874301B (en) * 2024-03-11 2024-05-31 浙江省气象台 Method for processing, storing and calling pyramid slice based on grid data

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111243091B (en) * 2020-04-09 2020-07-24 速度时空信息科技股份有限公司 Massive DEM pyramid slice parallel construction method based on distributed system
CN112381715B (en) * 2020-11-16 2024-04-09 航天科工(北京)空间信息应用股份有限公司 Method and device for parallel generation of map tiles by mass remote sensing images
CN112883130A (en) * 2021-01-05 2021-06-01 中国人民解放军国防科技大学 Method, device and medium for outputting map elevation data based on spatial database
CN113724229B (en) * 2021-08-31 2023-07-28 北京英视睿达科技股份有限公司 Method and device for determining elevation difference and electronic equipment
CN113989454B (en) * 2021-12-30 2022-03-18 山东省地质测绘院 Fusion method, device and system suitable for geological data and geographic information data
CN117724850B (en) * 2024-02-06 2024-04-19 天津先进技术研究院 Method, system, equipment and medium for evaluating feasibility of field pre-passing path

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110282635A1 (en) * 2010-05-14 2011-11-17 Conocophillips Company Stochastic downscaling algorithm and applications to geological model downscaling
CN103034999A (en) * 2012-12-05 2013-04-10 上海创图网络科技发展有限公司 Pyramid slicing method based on dynamic effect model (DEM) data
CN103455624A (en) * 2013-09-16 2013-12-18 湖北文理学院 Implement method of lightweight-class global multi-dimensional remote-sensing image network map service
CN111243091A (en) * 2020-04-09 2020-06-05 速度时空信息科技股份有限公司 Massive DEM pyramid slice parallel construction method based on distributed system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6426714B1 (en) * 2001-06-26 2002-07-30 Nokia Corporation Multi-level quantizer with current mode DEM switch matrices and separate DEM decision logic for a multibit sigma delta modulator
US8477190B2 (en) * 2010-07-07 2013-07-02 Pictometry International Corp. Real-time moving platform management system
CN106815807B (en) * 2017-01-11 2018-02-06 重庆市地理信息中心 A kind of unmanned plane image Fast Mosaic method based on GPU CPU collaborations
CN107229742A (en) * 2017-06-20 2017-10-03 华中科技大学 A kind of method that city easily flood point is determined based on remote sensing big data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110282635A1 (en) * 2010-05-14 2011-11-17 Conocophillips Company Stochastic downscaling algorithm and applications to geological model downscaling
CN103034999A (en) * 2012-12-05 2013-04-10 上海创图网络科技发展有限公司 Pyramid slicing method based on dynamic effect model (DEM) data
CN103455624A (en) * 2013-09-16 2013-12-18 湖北文理学院 Implement method of lightweight-class global multi-dimensional remote-sensing image network map service
CN111243091A (en) * 2020-04-09 2020-06-05 速度时空信息科技股份有限公司 Massive DEM pyramid slice parallel construction method based on distributed system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116302488A (en) * 2023-01-17 2023-06-23 重庆市地理信息和遥感应用中心(重庆市测绘产品质量检验测试中心) Multi-process automatic identification conversion method for topographic map data coordinates
CN116302488B (en) * 2023-01-17 2024-01-23 重庆市地理信息和遥感应用中心(重庆市测绘产品质量检验测试中心) Multi-process automatic identification conversion method for topographic map data coordinates
CN117874301A (en) * 2024-03-11 2024-04-12 浙江省气象台 Method for processing, storing and calling pyramid slice based on grid data
CN117874301B (en) * 2024-03-11 2024-05-31 浙江省气象台 Method for processing, storing and calling pyramid slice based on grid data

Also Published As

Publication number Publication date
CN111243091B (en) 2020-07-24
CN111243091A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
WO2021204026A1 (en) Distributed system-based concurrent construction method for massive dem pyramid tiles
CN103700088B (en) A kind of image set represented based on deformable graph structure is divided into segmentation method without supervision
CN113781667B (en) Three-dimensional structure simplified reconstruction method and device, computer equipment and storage medium
CN110827398B (en) Automatic semantic segmentation method for indoor three-dimensional point cloud based on deep neural network
CN112115534A (en) Method for converting three-dimensional house model into two-dimensional vector plane with height attribute
CN106815842A (en) A kind of improved image significance detection method based on super-pixel
Wang et al. Optimizing and accelerating space–time Ripley’s K function based on Apache Spark for distributed spatiotemporal point pattern analysis
CN115797592B (en) Method and device for automatically generating building block based on oblique photography three-dimensional model
CN112785710A (en) Rapid unitization method, system, memory and equipment for OSGB three-dimensional model building
Kitrungrotsakul et al. Liver segmentation using superpixel-based graph cuts and restricted regions of shape constrains
WO2022052750A1 (en) Significance prediction method and system for 360 degree image
Hao et al. Slice-based building facade reconstruction from 3D point clouds
CN116402973A (en) Oblique photography model optimization method and system based on LOD reconstruction
CN109741358B (en) Superpixel segmentation method based on adaptive hypergraph learning
CN102136151A (en) Method for vectorizing raster image
CN107908696A (en) A kind of parallel efficiently multidimensional space data clustering algorithm GRIDEN based on grid and density
CN107492101B (en) Multi-modal nasopharyngeal tumor segmentation algorithm based on self-adaptive constructed optimal graph
CN109961451A (en) A kind of material grains tissue segmentation methods based on marginal information
CN105260526A (en) Image based adaptive finite element mesh division method
CN106651864B (en) A kind of dividing method towards high-resolution remote sensing image
CN115661398A (en) Building extraction method, device and equipment for live-action three-dimensional model
CN116416387B (en) OSGB three-dimensional model rapid top layer reconstruction method
CN109410333B (en) High-quality super-patch clustering generation method
Yao et al. Accelerating surface remeshing through GPU-based computation of the restricted tangent face
Otepka et al. A framework for generic spatial search in 3d point clouds

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21785043

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21785043

Country of ref document: EP

Kind code of ref document: A1