[go: up one dir, main page]

CN118799499A - Three-dimensional green space optimization modeling method, device, equipment and medium based on landscape elevation connectivity - Google Patents

Three-dimensional green space optimization modeling method, device, equipment and medium based on landscape elevation connectivity Download PDF

Info

Publication number
CN118799499A
CN118799499A CN202411252995.0A CN202411252995A CN118799499A CN 118799499 A CN118799499 A CN 118799499A CN 202411252995 A CN202411252995 A CN 202411252995A CN 118799499 A CN118799499 A CN 118799499A
Authority
CN
China
Prior art keywords
elevation
landscape
connectivity
species
minimum
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202411252995.0A
Other languages
Chinese (zh)
Other versions
CN118799499B (en
Inventor
李艺
吴晨曦
赵雨轩
王一帆
王欣雨
张琪悦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen University
Original Assignee
Xiamen University
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 Xiamen University filed Critical Xiamen University
Priority to CN202411252995.0A priority Critical patent/CN118799499B/en
Publication of CN118799499A publication Critical patent/CN118799499A/en
Application granted granted Critical
Publication of CN118799499B publication Critical patent/CN118799499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本发明提供了基于景观高程连接度的三维绿地优化建模方法、装置、设备及介质,涉及绿地建模技术领域,方法包括:基于最小假设集原理构建集合群落结构;基于Dijkstra方法计算景观高程连接度;自定义参数优化三维绿地景观。在充分考虑山地生态系统多样性与地理空间复杂性前提下,定量评估海拔梯度对物种迁徙的促进‑抑制耦合作用,构建高分辨率三维绿地景观优化模型,揭示了生物多样性分布格局的自适应三维生态网络,解析气候变化驱动下山地景观优先保护区。

The present invention provides a three-dimensional green space optimization modeling method, device, equipment and medium based on landscape elevation connectivity, which relates to the field of green space modeling technology. The method includes: constructing a collective community structure based on the minimum hypothesis set principle; calculating landscape elevation connectivity based on the Dijkstra method; and optimizing three-dimensional green space landscapes with customized parameters. Under the premise of fully considering the diversity of mountain ecosystems and the complexity of geographic space, the promotion-inhibition coupling effect of altitude gradient on species migration is quantitatively evaluated, a high-resolution three-dimensional green space landscape optimization model is constructed, an adaptive three-dimensional ecological network of biodiversity distribution pattern is revealed, and priority protection areas of mountain landscapes driven by climate change are analyzed.

Description

基于景观高程连接度的三维绿地优化建模方法、装置、设备及 介质Three-dimensional green space optimization modeling method, device, equipment and medium based on landscape elevation connectivity

技术领域Technical Field

本发明涉及绿地建模技术领域,具体涉及基于景观高程连接度的三维绿地优化建模方法、装置、设备及介质。The present invention relates to the technical field of green space modeling, and in particular to a three-dimensional green space optimization modeling method, device, equipment and medium based on landscape elevation connectivity.

背景技术Background Art

当前,气候变化导致物种的迁徙路径和分布范围加速变化,除了在经纬度层面发生坐标偏移的经验结论外,生物迁徙还呈现沿海拔向山峰生境转移的趋势。高植被覆盖率的绿地景观为生物群落提供了高适宜性栖息地,可以作为物种迁徙的重要生态廊道或垫脚石,以维持较高的物种数量。传统生态网络模拟技术旨在识别基于经纬度二维位移变化的潜在生态廊道,在全球变暖驱动下生物种群如何沿海拔梯度迁移路径仍难以预测,从而较大程度地限制生物多样性保护与修复成效。Currently, climate change has led to accelerated changes in the migration paths and distribution ranges of species. In addition to the empirical conclusion that coordinate shifts occur at the latitude and longitude levels, biological migration also shows a trend of shifting to mountain habitats along the altitude. Green landscapes with high vegetation coverage provide highly suitable habitats for biological communities and can serve as important ecological corridors or stepping stones for species migration to maintain a high number of species. Traditional ecological network simulation technology aims to identify potential ecological corridors based on two-dimensional displacement changes in longitude and latitude. It is still difficult to predict how biological populations migrate along altitude gradients driven by global warming, which greatly limits the effectiveness of biodiversity conservation and restoration.

然而,由于生物个体或群落对气候变化的在海拔梯度的动态响应十分复杂,物种最优海拔、海拔上限(前缘)和海拔下限(后缘)不一定同步移动,甚至不一定在同一方向上移动。目前尚未建立指标反映物种跨越不同海拔梯度的扩散限制,尚缺少物种在山区内各向异性迁徙的三维场景展示,难以定量探究气候因子约束下迁徙路径的变化。三维形态实际上是在二维格局的基础上加入了高度或因高度衍生的其他特征信息。为了更好实现三维形态定量表征,首先需要构造满足科学需求的表面参数,然后通过"由面变体"的思路调整控制点完成形变。目前描述地形形态的物理指标包括海拔、坡度、坡角、地形起伏度等,这些指标尚未考虑物种运动的实际生态过程,无法全面反映山地景观斑块对促进或阻碍物种运动的能力。However, due to the complex dynamic response of biological individuals or communities to climate change along the altitude gradient, the optimal altitude, the upper limit (front edge) and the lower limit (back edge) of the species do not necessarily move synchronously, or even in the same direction. At present, no indicators have been established to reflect the diffusion restrictions of species across different altitude gradients, and there is still a lack of three-dimensional scene display of anisotropic migration of species in mountainous areas, making it difficult to quantitatively explore the changes in migration paths under the constraints of climate factors. Three-dimensional morphology is actually the addition of altitude or other characteristic information derived from altitude on the basis of two-dimensional pattern. In order to better realize the quantitative characterization of three-dimensional morphology, it is necessary to first construct surface parameters that meet scientific needs, and then adjust the control points to complete the deformation through the idea of "morphing from surface to body". At present, the physical indicators that describe terrain morphology include altitude, slope, slope angle, terrain undulation, etc. These indicators have not yet considered the actual ecological process of species movement and cannot fully reflect the ability of mountain landscape patches to promote or hinder species movement.

简单来说,现有技术主要针对经纬度二维平面的潜在生态廊道识别,缺少未来气候变化驱动下物种沿海拔迁徙路径的三维解析,较大程度的忽略了能更快应对气候变化且阻力较小的高适宜性生境。传统生态网络建模技术较多的从二维平面空间角度开展基于人类活动干扰与气候变化的研究,对于生物运动生态过程研究缺少沿海拔梯度变化的三维立体空间信息。海拔因素对物种迁移的促进/阻碍程度难以定性或定量描述,这主要是由于连续的山地景观呈现复杂分形结构,而非单调增减的椎体结构。物种迁移过程并非在离散的高程点上跳跃式前进,还要考虑整个坡面的摩擦阻力等。当海拔范围处于物种生态位宽度范围内时,摩擦阻力越大,物种在坡面运动做功越大、耗能越多,这意味着物种在面临跨海拔迁徙需求时,倾向于选择摩擦阻力小的坡面,从而分配较少能量转化为热能、保留其余能量给各类生命活动。In short, existing technologies mainly focus on the identification of potential ecological corridors in the two-dimensional plane of longitude and latitude, lack the three-dimensional analysis of species migration paths along the altitude driven by future climate change, and largely ignore the highly suitable habitats that can respond to climate change faster and have less resistance. Traditional ecological network modeling technology conducts research based on human activity interference and climate change from the perspective of two-dimensional plane space, and lacks three-dimensional spatial information along the altitude gradient for the study of biological movement ecological processes. The degree to which altitude factors promote/hinder species migration is difficult to describe qualitatively or quantitatively, mainly because the continuous mountain landscape presents a complex fractal structure rather than a monotonically increasing and decreasing vertebral structure. The species migration process does not jump forward at discrete elevation points, but also considers the friction resistance of the entire slope. When the altitude range is within the width of the species niche, the greater the friction resistance, the greater the work done by the species on the slope movement and the more energy consumed, which means that when faced with the need to migrate across altitudes, species tend to choose slopes with small friction resistance, thereby allocating less energy to heat energy and retaining the rest of the energy for various life activities.

并且阻力面赋值主观化、套路化,与实际情况中物种在不同山地生境斑块迁徙行为脱节。主要通过源地识别、阻力面叠加、廊道提取实现,聚焦人类活动等阻力因素的抑制作用评估,现有模拟手段主要采取专家打分法对不同栅格单元的本底值赋予阻力值,这种思路假设物种在相对平坦地表移动,从地上景观结构的相对阻碍能力出发,评价物种可达性,忽略了物种实际运动中跨越不同栅格单元是否存在海拔、坡度、坡角等扩散限制,导致对未来气候变化驱动下物种潜在适应性生境评估存在较大偏差。Moreover, the resistance surface assignment is subjective and routine, which is out of touch with the actual migration behavior of species in different mountain habitat patches. It is mainly achieved through source identification, resistance surface superposition, and corridor extraction, focusing on the evaluation of the inhibitory effect of resistance factors such as human activities. The existing simulation methods mainly use expert scoring methods to assign resistance values to the background values of different grid units. This idea assumes that species move on a relatively flat surface and evaluates species accessibility based on the relative barrier capacity of the ground landscape structure. It ignores whether there are diffusion restrictions such as altitude, slope, and slope angle in the actual movement of species across different grid units, resulting in a large deviation in the evaluation of potential adaptive habitats of species driven by future climate change.

有鉴于此,提出本申请。In view of this, this application is filed.

发明内容Summary of the invention

本发明提供了一种基于景观高程连接度的三维绿地优化建模方法、装置、设备及介质,能至少部分的改善上述问题。The present invention provides a three-dimensional green space optimization modeling method, device, equipment and medium based on landscape elevation connectivity, which can at least partially improve the above-mentioned problems.

为实现上述目的,本发明采用以下技术方案:To achieve the above object, the present invention adopts the following technical solutions:

一种基于景观高程连接度的三维绿地优化建模方法,其包括:A three-dimensional green space optimization modeling method based on landscape elevation connectivity includes:

获取预设的最小假设集原理,根据所述最小假设集原理构建集合群落结构,生成CSV文件,其中,集合群落结构是由属于S种不同物种的N个局部群落×n个个体的局部群落组织组成,局部群落组织在一个等间距的2D网格中,每个网格单元假设海拔为唯一生态位特征,当物种移动至不同的网格单元时,对应不同的海拔适宜度;Obtain the preset minimum hypothesis set principle, construct the metacommunity structure according to the minimum hypothesis set principle, and generate a CSV file, where the metacommunity structure is composed of local community organizations of N local communities × n individuals belonging to S different species, and the local community organizations are organized in an equally spaced 2D grid. Each grid unit assumes that the altitude is the only ecological niche feature. When the species moves to different grid units, it corresponds to different altitude suitability;

根据CSV文件和Dijkstra方法计算景观高程连接度结果,并绘制景观高程连接度结果的直方图、散点图、折线图、密度图;Calculate the landscape elevation connectivity results based on the CSV file and the Dijkstra method, and draw the histogram, scatter plot, line graph, and density map of the landscape elevation connectivity results;

对景观高程连接度结果进行转换处理,设置图层基本高度,生成LEC边界截面。The landscape elevation connectivity results are converted, the layer base height is set, and the LEC boundary section is generated.

本发明还提供了一种基于景观高程连接度的三维绿地优化建模装置,其包括:The present invention also provides a three-dimensional green space optimization modeling device based on landscape elevation connectivity, which includes:

结构构建单元,用于获取预设的最小假设集原理,根据所述最小假设集原理构建集合群落结构,生成CSV文件,其中,集合群落结构是由属于S种不同物种的N个局部群落×n个个体的局部群落组织组成,局部群落组织在一个等间距的2D网格中,每个网格单元假设海拔为唯一生态位特征,当物种移动至不同的网格单元时,对应不同的海拔适宜度;The structure construction unit is used to obtain the preset minimum hypothesis set principle, construct the metacommunity structure according to the minimum hypothesis set principle, and generate a CSV file, wherein the metacommunity structure is composed of local community organizations of N local communities × n individuals belonging to S different species, and the local community organizations are organized in an equally spaced 2D grid. Each grid unit assumes that the altitude is the only ecological niche feature. When the species moves to different grid units, it corresponds to different altitude suitability;

绘制单元,用于根据CSV文件和Dijkstra方法计算景观高程连接度结果,并绘制景观高程连接度结果的直方图、散点图、折线图、密度图;A drawing unit, used to calculate the landscape elevation connectivity results according to the CSV file and the Dijkstra method, and draw a histogram, a scatter plot, a line graph, and a density map of the landscape elevation connectivity results;

边界截面生成单元,用于对景观高程连接度结果进行转换处理,设置图层基本高度,生成LEC边界截面。The boundary section generation unit is used to convert the landscape elevation connectivity results, set the layer basic height, and generate the LEC boundary section.

本发明还提供了一种基于景观高程连接度的三维绿地优化建模设备,其特征在于,包括存储器以及处理器,所述存储器内存储有计算机程序,所述计算机程序能够被所述处理器执行,以实现如上任意一项所述的基于景观高程连接度的三维绿地优化建模方法。The present invention also provides a three-dimensional green space optimization modeling device based on landscape elevation connectivity, characterized in that it includes a memory and a processor, wherein a computer program is stored in the memory, and the computer program can be executed by the processor to implement the three-dimensional green space optimization modeling method based on landscape elevation connectivity as described in any one of the above items.

本发明还提供了一种计算机可读存储介质,其特征在于,存储有计算机程序,所述计算机程序能够被所述计算机可读存储介质所在设备的处理器执行,以实现如上任意一项所述的基于景观高程连接度的三维绿地优化建模方法。The present invention also provides a computer-readable storage medium, characterized in that it stores a computer program, and the computer program can be executed by a processor of a device where the computer-readable storage medium is located to implement a three-dimensional green space optimization modeling method based on landscape elevation connectivity as described in any one of the above items.

综上,所述基于景观高程连接度的三维绿地优化建模方法基于海拔梯度构建景观生态网络,构造plotElevation、init_landscapeConnectivity、computeMinPath、splitRowWise、_test_progress、computeLEC等函数模块,实现景观高程连接度自动化计算。方法包括初始化景观高程连接度、计算最小路径、按行拆分计算域、进度条显示、计算LEC、写入和查看结果。通过并行计算实现高效处理,确保计算结果的准确性和可靠性。LEC值越高,表示该地点面积总和较大、海拔连通性较好,越有可能允许物种“翻山越岭”。并且本方法还自定义了参数优化三维绿地建模,借助ArcScene展示LEC结果,实现三维绿地景观优化和可视化。根据LEC值的视觉效果,可以预测山地内物种的潜在迁徙路径。In summary, the three-dimensional green space optimization modeling method based on landscape elevation connectivity constructs a landscape ecological network based on the altitude gradient, constructs function modules such as plotElevation, init_landscapeConnectivity, computeMinPath, splitRowWise, _test_progress, and computeLEC, and realizes the automatic calculation of landscape elevation connectivity. The method includes initializing landscape elevation connectivity, calculating the minimum path, splitting the calculation domain by row, displaying the progress bar, calculating LEC, writing and viewing the results. Efficient processing is achieved through parallel computing to ensure the accuracy and reliability of the calculation results. The higher the LEC value, the larger the total area of the site and the better the altitude connectivity, and the more likely it is to allow species to "cross mountains and ridges." In addition, this method also customizes parameter optimization of three-dimensional green space modeling, uses ArcScene to display LEC results, and realizes three-dimensional green space landscape optimization and visualization. According to the visual effect of the LEC value, the potential migration path of species in the mountains can be predicted.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本发明实施例提供的基于景观高程连接度的三维绿地优化建模方法的流程示意图;1 is a schematic diagram of a flow chart of a three-dimensional green space optimization modeling method based on landscape elevation connectivity provided by an embodiment of the present invention;

图2是本发明实施例提供的景观高程连接度计算原理示意图;FIG2 is a schematic diagram of the landscape elevation connectivity calculation principle provided by an embodiment of the present invention;

图3是本发明实施例提供的Dijkstra算法示意图,其中,图3为图2中框出的子图;FIG3 is a schematic diagram of a Dijkstra algorithm provided by an embodiment of the present invention, wherein FIG3 is a subgraph framed in FIG2 ;

图4是本发明实施例提供的按行拆分计算域示意图;FIG4 is a schematic diagram of splitting a computational domain by row according to an embodiment of the present invention;

图5是本发明实施例提供的海南藏族自治州某区域海拔和LEC结果对比图;FIG5 is a comparison diagram of altitude and LEC results of a certain area in Hainan Tibetan Autonomous Prefecture provided by an embodiment of the present invention;

图6是本发明实施例提供的海南藏族自治州某区域海拔频率分布和LEC频率分布组图;FIG6 is a group diagram of the altitude frequency distribution and LEC frequency distribution of a certain area in Hainan Tibetan Autonomous Prefecture provided by an embodiment of the present invention;

图7是本发明实施例提供的海南藏族自治州某区域LEC结果的三维展示图;FIG7 is a three-dimensional display diagram of LEC results of a certain area in Hainan Tibetan Autonomous Prefecture provided by an embodiment of the present invention;

图8是本发明实施例提供的湖州市某区域海拔和LEC结果对比图;FIG8 is a comparison diagram of the altitude and LEC results of a certain area in Huzhou City provided by an embodiment of the present invention;

图9是本发明实施例提供的湖州市某区域海拔频率分布和LEC频率分布组图;9 is a group diagram of the altitude frequency distribution and LEC frequency distribution of a certain area in Huzhou City provided by an embodiment of the present invention;

图10是本发明实施例提供的湖州市某区域LEC结果的三维展示;FIG10 is a three-dimensional display of LEC results for a certain area in Huzhou City provided by an embodiment of the present invention;

图11是本发明实施例提供的基于景观高程连接度的三维绿地优化建模装置的模块示意图。FIG. 11 is a module diagram of a three-dimensional green space optimization modeling device based on landscape elevation connectivity provided in an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

为了使本发明的目的、技术方案及优点更加清楚明白,下面结合实施例,进一步详细说明本发明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

参考图1、图2所示,本发明第一实施例公开了一种基于景观高程连接度的三维绿地优化建模方法,其可由基于景观高程连接度的三维绿地优化建模设备(以下简称建模设备)来执行,特别的,由所述建模设备内的一个或者多个处理器来执行,以实现如下方法:Referring to FIG. 1 and FIG. 2 , the first embodiment of the present invention discloses a three-dimensional green space optimization modeling method based on landscape elevation connectivity, which can be executed by a three-dimensional green space optimization modeling device based on landscape elevation connectivity (hereinafter referred to as a modeling device), and in particular, executed by one or more processors in the modeling device to implement the following method:

S1,获取预设的最小假设集原理,根据所述最小假设集原理构建集合群落结构,生成CSV文件,其中,集合群落结构是由属于S种不同物种的N个局部群落×n个个体的局部群落组织组成,局部群落组织在一个等间距的2D网格中,每个网格单元假设海拔为唯一生态位特征,当物种移动至不同的网格单元时,对应不同的海拔适宜度;S1, obtain the preset minimum hypothesis set principle, construct the metacommunity structure according to the minimum hypothesis set principle, and generate a CSV file, wherein the metacommunity structure is composed of local community organizations of N local communities × n individuals belonging to S different species, and the local community organizations are organized in an equally spaced 2D grid. Each grid unit assumes that the altitude is the only ecological niche feature. When the species moves to different grid units, it corresponds to different altitude suitability;

优选地,所述最小假设集原理包括:Preferably, the minimum hypothesis set principle includes:

每个物种的个体具有取决于海拔的适合度,所有其他生命率是相同的,其中,这种情况下的竞争能力公式为:Individuals of each species have a fitness that depends on altitude, all other vital rates being equal, where the formula for competitive ability is:

其中,为个体位于海拔时,最大的竞争能力,反映了物种i的个体在海拔z处的竞争能力,为物种i的生态位位置,为生态位宽度;in, For individuals at altitude The greatest competitiveness, reflects the competitive ability of individuals of species i at altitude z, is the ecological niche position of species i, is the niche width;

不同物种具有不同的生态位位置,但生态位宽度相同;Different species have different niche positions, but the same niche breadth;

生态位位置沿域的海拔范围均匀分布,在集合群落尺度上不存在优先海拔;Niche positions were evenly distributed along the elevation range of the domain, and there was no preferred elevation at the metacommunity scale;

分散是各向同性的;The dispersion is isotropic;

每个局部群落的栖息地容量恒定为n。The habitat capacity of each local community is constant n.

具体地,步骤S1包括:获取预设的最小假设集原理,基于所述最小假设集原理,将栅格文件从经纬度坐标重新投影到WGS 84_UTM坐标系,寻找对应的EPSG代码,并指定投影后高程网格的分辨率,得到网格化的高程点矩阵,命名为elev数组;Specifically, step S1 includes: obtaining a preset minimum hypothesis set principle, based on the minimum hypothesis set principle, reprojecting the raster file from the latitude and longitude coordinates to the WGS 84_UTM coordinate system, finding the corresponding EPSG code, and specifying the resolution of the elevation grid after projection, to obtain a gridded elevation point matrix, named elev array;

构造函数plotElevation (data, cmin, cmax, colormap)绘制初始elev数组的图像,并根据图像的视图效果从elev数组中选择行数和列数的范围,删除由重投影引起的nodata值,根据裁剪后的elev数组定义一个新的高程数组dem,其中,data为要绘制的数据集dem,cmin和cmax为颜色映射的范围,colormap为要使用的颜色映射表;The constructor plotElevation (data, cmin, cmax, colormap) draws the image of the initial elev array, selects the range of rows and columns from the elev array according to the image viewing effect, deletes the nodata value caused by reprojection, and defines a new elevation array dem based on the clipped elev array, where data is the data set dem to be drawn, cmin and cmax are the range of the color map, and colormap is the color map to be used;

基于高程数组dem指定X轴和Y轴,并创建X坐标和Y坐标,使用step参数降低分辨率,得到划分好的等距2D网格;Specify the X-axis and Y-axis based on the elevation array dem, create X-coordinates and Y-coordinates, use the step parameter to reduce the resolution, and obtain a well-divided equidistant 2D grid;

将划分好的等距2D网格写入CSV文件,得到集合群落结构。Write the divided equidistant 2D grid into a CSV file to obtain the collective community structure.

在本实施例中,规定一套假设以针对性探究地貌景观结构对物种分布的影响,排除其他可能的混杂因素。假设如下:(Ⅰ)每个物种的个体具有取决于海拔的适合度(即在这种情况下的竞争能力,公式(1)),所有其他生命率是相同的;(Ⅱ)不同物种具有不同的生态位位置,但生态位宽度相同;(Ⅲ)生态位位置沿域的海拔范围均匀分布,因此在集合群落尺度上不存在优先海拔;(Ⅳ)分散是各向同性的(在规则的2D网格中朝向四个最近的局部群落);(Ⅴ)每个局部群落的栖息地容量恒定为n。In this example, a set of assumptions is specified to specifically explore the effects of landscape structure on species distribution, excluding other possible confounding factors. The assumptions are as follows: (I) Individuals of each species have a fitness that depends on altitude (i.e., competitive ability in this case, formula (1)), and all other vital rates are the same; (II) Different species have different niche positions, but the same niche width; (III) Niche positions are evenly distributed along the elevation range of the domain, so there is no preferred elevation at the metacommunity scale; (IV) Dispersion is isotropic (towards the four nearest local communities in a regular 2D grid); (V) The habitat capacity of each local community is constant at n.

因此,在任何时候,集合群落系统都是由属于S种不同物种的N(局部群落)×n(个体)组成的。这些局部群落组织在一个等间距的2D网格中,每个网格单元假设海拔为唯一生态位特征。物种移动至不同的网格单元时,对应不同的海拔适宜度。从功和机械能的角度来理解,将不同海拔地点间适宜度差值的绝对值理解为连接两点间坡面的摩擦阻力。Therefore, at any time, the metacommunity system is composed of N (local communities) × n (individuals) belonging to S different species. These local communities are organized in an equally spaced 2D grid, and each grid cell assumes altitude as a unique niche feature. When species move to different grid cells, they correspond to different altitude suitability. From the perspective of work and mechanical energy, the absolute value of the difference in suitability between locations at different altitudes is understood as the friction resistance of the slope connecting the two points.

为个体位于海拔时,最大的竞争能力,反映了物种i的个体在海拔z处的竞争能力,是物种i的生态位位置,个体位于海拔z=时,其竞争能力最大。表示生态位宽度,控制着高斯函数的离散度。 For individuals at altitude The greatest competitiveness, reflects the competitive ability of individuals of species i at altitude z, is the ecological niche position of species i, and the individual is located at altitude z= Its competitiveness is greatest when Represents the niche width and controls the discreteness of the Gaussian function.

具体的,请参阅以下步骤:For details, please refer to the following steps:

步骤1:栅格网格重投影。GeoTIFF文件是嵌入地理信息(纬度、经度、地图投影等)的栅格数据集。GeoTIFF文件的地理数据可用于将图像定位在正确的位置和几何形状,以构建后续景观演化模型中使用的结构化和非结构化网格。将栅格文件从经纬度坐标重新投影到WGS 84_UTM (米)坐标系,并在http://spatialreference.org/ref/epsg/上找到对应的EPSG代码。指定投影后高程网格的分辨率,得到网格化的高程点矩阵(本质上是包含一个2D切片的NumPy数组,命名为elev)。Step 1: Reproject the raster grid. A GeoTIFF file is a raster dataset that embeds geographic information (latitude, longitude, map projection, etc.). The geographic data of a GeoTIFF file can be used to position the image at the correct location and geometry to construct structured and unstructured grids used in subsequent landscape evolution models. Reproject the raster file from latitude and longitude coordinates to the WGS 84_UTM (meter) coordinate system and find the corresponding EPSG code at http://spatialreference.org/ref/epsg/. Specify the resolution of the elevation grid after projection to obtain a gridded elevation point matrix (essentially a NumPy array containing a 2D slice, named elev).

步骤2:裁剪elev数组。构造函数plotElevation (data, cmin, cmax, colormap)来绘制初始elev数组图像,根据视图效果从elev数组中选择行数和列数的范围,以删除由重投影引起的nodata值。根据裁剪后的elev数组定义一个新的高程数组dem。Step 2: Crop the elev array. The constructor plotElevation (data, cmin, cmax, colormap) is used to draw the initial elev array image. The range of rows and columns is selected from the elev array according to the viewing effect to remove the nodata value caused by reprojection. A new elevation array dem is defined based on the cropped elev array.

步骤3:指定X和Y轴。为了保持坐标系统用于后处理,并可能在另一个地理空间系统中重新投影LEC的输出,需要指定X轴和Y轴。随后创建X和Y坐标,选择使用step参数(整数)来降低分辨率。Step 3: Specify the X and Y axes. In order to maintain the coordinate system for post-processing and possibly reprojecting the output of the LEC in another geospatial system, the X and Y axes need to be specified. The X and Y coordinates are then created, optionally using the step parameter (an integer) to reduce the resolution.

步骤4:将划分好的等距2D网格写入csv文件。Step 4: Write the divided equidistant 2D grid into a csv file.

S2,根据CSV文件和Dijkstra方法计算景观高程连接度结果,并绘制景观高程连接度结果的直方图、散点图、折线图、密度图;S2, calculate the landscape elevation connectivity results according to the CSV file and the Dijkstra method, and draw the histogram, scatter plot, line graph, and density map of the landscape elevation connectivity results;

具体地,步骤S2包括:基于CSV文件,构造函数init_landscapeConnectivity(filename, sigmap=0.1, sigmav=None, connected=True, delimiter=' ', sl=-1.e6,test=False),定义假设生态位的宽度,并计算最小路径的参数,其中,filename (str)为包含规则间距高程网格的CSV文件名,sigmap(float)为基于海拔高度的物种生态位宽度百分比,sigmav (float)为物种生态位固定宽度值,connected (bool)为根据对角线移动和轴向移动计算路径,delimiter (str)为高程网格CSV分隔符,sl (float)为用于从LEC计算中移除海洋点的海平面位置;Specifically, step S2 includes: based on the CSV file, the constructor init_landscapeConnectivity(filename, sigmap=0.1, sigmav=None, connected=True, delimiter=' ', sl=-1.e6,test=False) defines the width of the hypothesized niche and calculates the parameters of the minimum path, where filename (str) is the name of the CSV file containing the regularly spaced elevation grid, sigmap (float) is the species niche width percentage based on altitude, sigmav (float) is the species niche fixed width value, connected (bool) is the path calculated based on diagonal and axial movement, delimiter (str) is the elevation grid CSV delimiter, and sl (float) is the sea level position used to remove ocean points from the LEC calculation;

根据最小路径的参数,构造函数computeMinPath(r, c),计算特定节点与所有其他节点之间的最小路径,根据考虑的节点和所有其他顶点之间的高程差的平方创建成本曲面,从权重面创建一个“landscape graph”对象,使用距离加权最小成本路径进行分析,计算从起始单元格到所有其他单元格的最小成本距离,生成景观高程连接度结果,其中,在景观高程连接度值中,借助scikit-image库中Dijkstra算法计算成本最低的距离,r为二维数组dem的行索引,c为二维数组dem的列索引;According to the parameters of the minimum path, the constructor computeMinPath(r, c) calculates the minimum path between a specific node and all other nodes, creates a cost surface based on the square of the elevation difference between the considered node and all other vertices, creates a "landscape graph" object from the weighted surface, uses the distance-weighted minimum cost path for analysis, calculates the minimum cost distance from the starting cell to all other cells, and generates the landscape elevation connectivity result, where, in the landscape elevation connectivity value, the distance with the lowest cost is calculated with the help of the Dijkstra algorithm in the scikit-image library, r is the row index of the two-dimensional array dem, and c is the column index of the two-dimensional array dem;

其中,景观高程连接度结果的公式为:Among them, the formula for the landscape elevation connectivity result is:

其中,表示任意一个局部群落站点i处的景观高程连接度,为站点处的海拔,为物种的最适生态位位置,为物种的生态位宽幅,度量了站点j与站点i之间高程适宜度的接近程度,j可以是N×n集合群落结构中任一局部群落站点,度量了沿路径p从群路j到i的接近程度,k1,k2,...,kL是路径p包含的所有群落站点,k1= j,kL= i。in, represents the landscape elevation connectivity at any local community site i, For Site The altitude of is the optimal ecological niche position of the species, is the niche breadth of the species, It measures the closeness of the elevation suitability between site j and site i, where j can be any local community site in the N×n metacommunity structure. It measures the proximity from cluster j to i along path p, where k 1 , k 2 , ..., k L are all cluster sites included in path p, k 1 = j, k L = i.

构造函数splitRowWise( ),按行拆分计算域,使用分布在多个处理器上的消息传递接口MPI,在整个区域内采用Dijkstra算法计算属于每个子域的点的最小成本路径;The constructor splitRowWise() splits the computational domain by rows and uses the message passing interface MPI distributed on multiple processors to calculate the minimum cost path of the points belonging to each subdomain in the entire region using the Dijkstra algorithm;

构造函数_test_progress(job_title, progress),根据progress参数计算并显示进度条,以动态更新进度信息,并在作业完成时,显示“DONE”,其中,job_title为当前正在执行的任务名称,progress为一个介于0和1之间的浮点数,0表示任务刚开始,1表示任务已经完成;Constructor _test_progress(job_title, progress), calculates and displays a progress bar based on the progress parameter to dynamically update progress information, and displays "DONE" when the job is completed, where job_title is the name of the task currently being executed, and progress is a floating point number between 0 and 1, where 0 means the task has just started and 1 means the task has been completed;

构造函数computeLEC(fout=500),同时调用函数computeMinPath()、splitRowWise()、_test_progress(),按行分割以csv文件导入的数组,行计算每个节点在相似海拔范围内的接近度,得到一个表示景观高度连接度的二维数组,并将该数组以csv文件保存至工作环境;The constructor computeLEC(fout=500) calls the functions computeMinPath(), splitRowWise(), and _test_progress() at the same time to split the array imported from the csv file by row, calculate the proximity of each node within a similar altitude range, and obtain a two-dimensional array representing the landscape height connectivity. The array is saved to the working environment as a csv file.

构造函数writeLEC(filename=‘LECout’),将景观高程连接度结果、原始高程数据保存到磁盘中,其中,MPI并行计算环境下,将数据从2D数组转换为1D数组,创建DataFrame保存为csv文件,并使用gridToVTK函数保存为vtk文件;The constructor writeLEC(filename='LECout') saves the landscape elevation connectivity results and the original elevation data to disk. In the MPI parallel computing environment, the data is converted from a 2D array to a 1D array, a DataFrame is created and saved as a csv file, and then saved as a vtk file using the gridToVTK function.

构造函数viewResult(imName=None, size, fsize, cmap1, cmap2, dpi),创建一个包含两个子图的图像窗口,在第一个子图上显示高程数据,添加颜色条,在第二个子图上显示景观高程连接性数据,添加颜色条,并自动调整子图布局,添加图像标题,其中,size为绘图窗口的大小,fsize为字体的大小,cmap1为第一幅图Elevation的颜色映射表,cmap1为第二幅图LEC的颜色映射表,dpi为图像分辨率;The constructor viewResult(imName=None, size, fsize, cmap1, cmap2, dpi) creates an image window containing two sub-images, displays elevation data on the first sub-image, adds a color bar, displays landscape elevation connectivity data on the second sub-image, adds a color bar, automatically adjusts the sub-image layout, and adds an image title, where size is the size of the drawing window, fsize is the font size, cmap1 is the color map of the first image Elevation, cmap2 is the color map of the second image LEC, and dpi is the image resolution;

构造函数viewElevFrequency(input=None, imName=None, nbins, size,fsize, dpi),从指定的CSV文件中读取数据,计算高程数据的最小值,当判断到该最小值低于海平面时,使用海平面值,创建高程数据的直方图,设置标题和标签,并在同一图上添加高程数据的密度图,设置标题和标签,其中,nbins为直方图中的柱状数量bin,即将数据划分为多少个区间;The constructor viewElevFrequency(input=None, imName=None, nbins, size,fsize, dpi) reads data from the specified CSV file, calculates the minimum value of the elevation data, and when it is determined that the minimum value is lower than sea level, uses the sea level value to create a histogram of the elevation data, sets the title and label, and adds a density map of the elevation data on the same map, sets the title and label, where nbins is the number of bins in the histogram, that is, how many intervals the data is divided into;

构造函数viewLECFrequency(input=None, imName=None, size, fsize, dpi),从指定的CSV文件中读取数据,计算高程数据的最小值,当判断到该最小值低于海平面时,使用海平面值,创建LEC数据的散点图,并设置标题和标签;The constructor viewLECFrequency(input=None, imName=None, size, fsize, dpi) reads data from the specified CSV file, calculates the minimum value of the elevation data, and when it is determined that the minimum value is lower than sea level, uses the sea level value to create a scatter plot of the LEC data and sets the title and label.

构造函数viewLECZbar(input=None, imName=None, nbins, size, fsize,dpi),从指定的CSV文件中读取数据,计算高程数据的直方图,并根据LEC数据计算加权直方图和平方权重直方图,计算每个bin的平均值和标准差,绘制高程与LEC平均值的折线图和散点图;The constructor viewLECZbar(input=None, imName=None, nbins, size, fsize,dpi) reads data from the specified CSV file, calculates the histogram of elevation data, and calculates the weighted histogram and square weighted histogram based on the LEC data, calculates the mean and standard deviation of each bin, and draws a line graph and a scatter plot of elevation and LEC mean.

绘制误差棒,其中,表示每个bin的标准差,并创建一个共享x轴的新y轴,绘制高程数据的密度图,设置图像标题、标签和刻度字体大小。Plot error bars, where represents the standard deviation of each bin, and create a new y-axis that shares the x-axis, plot a density plot of the elevation data, and set the image title, labels, and tick font size.

在本实施例中,根据“中域效应”理论、“种-面积”关系及经典“岛屿生物地理学”理论,识别并分析山地景观的三个独特地貌特征:(a) 景观海拔范围的有限性、(b) 不同海拔的面积频率分布、(c) 不同地点的海拔连通性。据此定义景观高程连接度 (LEC),量化了山地景观中任何一点与相似海拔的所有其他点的接近程度。LEC值是网格内某一单元出发、到网格内所有其他单元的最优路径的总和。最优路径的度量标准是物种途径单元格的海拔适宜度,海拔适宜度越高,物种选择路径时经过该点的概率越大。这种定义也可以看作是对摩擦阻力做功做正向化处理,即LEC值越高,物种从该点出发到景观范围内所有其他点所做的负功越少,物种能耗越低。In this embodiment, based on the "mid-domain effect" theory, the "species-area" relationship and the classic "island biogeography" theory, three unique geomorphological features of mountain landscapes are identified and analyzed: (a) the limited range of landscape altitude, (b) the frequency distribution of areas at different altitudes, and (c) the altitude connectivity of different locations. Landscape elevation connectivity (LEC) is defined accordingly, which quantifies the proximity of any point in the mountain landscape to all other points at similar altitudes. The LEC value is the sum of the optimal paths from a certain cell in the grid to all other cells in the grid. The metric for the optimal path is the altitude suitability of the cell along the species' pathway. The higher the altitude suitability, the greater the probability that the species will pass through the point when choosing a path. This definition can also be seen as a positive treatment of the work done by frictional resistance, that is, the higher the LEC value, the less negative work the species does from the point to all other points in the landscape range, and the lower the energy consumption of the species.

度量了站点j与站点i之间高程适宜度的接近程度,j可以是N×n集合群落系统中任一局部群落站点。度量了沿路径p从群路j到i的接近程度,假设Cji,p与路径p上每一步定殖概率的乘积成正比,取高斯适宜度函数的指数部分构成公式,k1,k2,...,kL是路径p包含的所有群落站点 (k1= j,kL= i)。 It measures the closeness of the elevation suitability between site j and site i, where j can be any local community site in the N×n metacommunity system. It measures the proximity from group j to i along path p. Assuming that Cji,p is proportional to the product of the colonization probability of each step on path p, the exponential part of the Gaussian fitness function is used to form the formula , k 1 , k 2 ,..., k L are all community sites included in path p (k 1 = j, k L = i).

具体参阅以下步骤:Please refer to the following steps for details:

步骤1:构造函数init_landscapeConnectivity(filename, sigmap=0.1, sigmav=None, connected=True, delimiter=' ', sl=-1.e6, test=False)。各参数内涵如下表:Step 1: Constructor init_landscapeConnectivity(filename, sigmap=0.1, sigmav=None, connected=True, delimiter=' ', sl=-1.e6, test=False). The meaning of each parameter is as follows:

步骤2:构造函数computeMinPath(r, c),用于计算特定节点与所有其他节点之间的最小路径。根据考虑的节点和所有其他顶点之间的高程差的平方创建成本曲面,从权重面创建一个“landscape graph”对象,然后可以使用距离加权最小成本路径进行分析,计算从起始单元格到所有其他单元格的最小成本距离(示意图3)。在LEC中,我们借助scikit-image库中Dijkstra算法来计算成本最低的距离。Step 2: The constructor computeMinPath(r, c) is used to calculate the minimum path between a specific node and all other nodes. A cost surface is created based on the square of the elevation difference between the considered node and all other vertices. A "landscape graph" object is created from the weighted surface, which can then be analyzed using the distance-weighted minimum cost path to calculate the minimum cost distance from the starting cell to all other cells (Figure 3). In LEC, we use the Dijkstra algorithm in the scikit-image library to calculate the distance with the lowest cost.

步骤3:构造函数splitRowWise( )。Dijkstra算法是一种求解非负权图的单源最短路径的图搜索算法。这样的算法可能需要很长时间才能解决,特别是在LEC中,因为它需要用于计算表面上每个点的最小成本路径。这里我们按行拆分计算域,并使用消息传递接口(MPI)分布在多个处理器上,其中所有路径的Dijkstra树都是平衡的(示意图4)。然后在整个区域内使用Dijkstra算法计算属于每个子域的点的最小成本路径。Step 3: Constructor splitRowWise(). Dijkstra's algorithm is a graph search algorithm that finds the shortest path from a single source on a non-negatively weighted graph. Such an algorithm may take a long time to solve, especially in LEC, because it needs to be used to calculate the minimum cost path for each point on the surface. Here we split the computational domain by rows and distribute it across multiple processors using the message passing interface (MPI), where the Dijkstra trees for all paths are balanced (Figure 4). The Dijkstra algorithm is then used over the entire region to calculate the minimum cost path for the points belonging to each subdomain.

步骤4:构造函数_test_progress(job_title, progress),以显示作业进度的可视化进度条。根据progress参数计算并显示进度条,动态更新进度信息,并在作业完成时显示“DONE”。Step 4: Construct the function _test_progress(job_title, progress) to display a visual progress bar of the job progress. The progress bar is calculated and displayed based on the progress parameter, the progress information is dynamically updated, and "DONE" is displayed when the job is completed.

步骤5:构造函数computeLEC(fout=500)。调用上述computeMinPath()、splitRowWise()、_test_progress()函数,按行分割以csv文件导入的数组,并行计算每个节点在相似海拔范围内的接近度。最终结果是一个表示景观高度连接度的二维数组,该数组以csv文件保存至工作环境。Step 5: Constructor computeLEC(fout=500). Call the above computeMinPath(), splitRowWise(), and _test_progress() functions to split the array imported from the csv file by row, and parallely calculate the proximity of each node within a similar elevation range. The final result is a two-dimensional array representing the landscape height connectivity, which is saved to the working environment as a csv file.

步骤6:构造函数writeLEC(filename=‘LECout’),将计算得到的LEC结果、原始高程数据保存到磁盘中。具体包括将数据从2D数组转换为1D数组,创建DataFrame保存为csv文件,以及使用gridToVTK函数保存为vtk文件。整个过程在MPI并行计算环境下进行。Step 6: The constructor writeLEC(filename='LECout') saves the calculated LEC results and the original elevation data to disk. Specifically, it converts the data from a 2D array to a 1D array, creates a DataFrame and saves it as a csv file, and uses the gridToVTK function to save it as a vtk file. The entire process is performed in an MPI parallel computing environment.

步骤7:构造函数viewResult(imName=None, size, fsize, cmap1, cmap2,dpi)。创建一个包含两个子图的图像窗口,在第一个子图上显示高程数据,添加颜色条,在第二个子图上显示景观高程连接性数据,添加颜色条。自动调整子图布局,添加图像标题。Step 7: Constructor viewResult(imName=None, size, fsize, cmap1, cmap2,dpi). Create an image window with two sub-images, display elevation data on the first sub-image, add a color bar, display landscape elevation connectivity data on the second sub-image, add a color bar. Automatically adjust the sub-image layout and add an image title.

步骤8:构造函数viewElevFrequency(input=None, imName=None, nbins, size,fsize, dpi)。从指定的CSV文件中读取数据。计算高程数据的最小值,如果该值低于海平面,则使用海平面值。创建高程数据的直方图,并设置标题和标签。在同一图上添加高程数据的密度图,并设置标题和标签。Step 8: Constructor viewElevFrequency(input=None, imName=None, nbins, size,fsize, dpi). Read data from the specified CSV file. Calculate the minimum value of the elevation data, and if the value is below sea level, use the sea level value. Create a histogram of the elevation data and set the title and labels. Add a density plot of the elevation data on the same plot and set the title and labels.

步骤9:构造函数viewLECFrequency(input=None, imName=None, size, fsize,dpi)。从指定的CSV文件中读取数据。计算高程数据的最小值,如果该值低于海平面,则使用海平面值。创建LEC数据的散点图,并设置标题和标签。Step 9: Constructor viewLECFrequency(input=None, imName=None, size, fsize,dpi). Read data from the specified CSV file. Calculate the minimum value of the elevation data. If the value is below sea level, use the sea level value. Create a scatter plot of the LEC data and set the title and labels.

步骤10:构造函数viewLECZbar(input=None, imName=None, nbins, size,fsize, dpi)。从指定的CSV文件中读取数据,计算高程数据的直方图,并根据LEC数据计算加权直方图和平方权重直方图。计算每个bin的平均值和标准差。绘制高程与LEC平均值的折线图和散点图。绘制误差棒,表示每个bin的标准差。创建一个共享x轴的新y轴,并绘制高程数据的密度图。最后设置图像标题、标签和刻度字体大小。Step 10: Constructor viewLECZbar(input=None, imName=None, nbins, size,fsize, dpi). Read data from the specified CSV file, calculate the histogram of the elevation data, and calculate the weighted histogram and squared weighted histogram based on the LEC data. Calculate the mean and standard deviation for each bin. Plot a line and scatter plot of elevation versus LEC mean. Plot error bars representing the standard deviation for each bin. Create a new y-axis that shares the x-axis and plot a density plot of the elevation data. Finally, set the image title, label, and tick font size.

S3,对景观高程连接度结果进行转换处理,设置图层基本高度,生成LEC边界截面。S3, convert the landscape elevation connectivity results, set the layer base height, and generate the LEC boundary section.

具体地,步骤S3包括:利用arcpy库,将景观高程连接度结果转换为GeoTiff栅格文件,其中,使用arcpy.CreateFeatureclass_management创建点要素类,使用arcpy.AddField_management添加字段,使用arcpy.InsertCursor以游标按行插入数据;通过使用arcpy.conversion.PointToRaster将点矢量文件转换为栅格文件LEC.GIF;Specifically, step S3 includes: using the arcpy library to convert the landscape elevation connectivity result into a GeoTiff raster file, wherein arcpy.CreateFeatureclass_management is used to create a point feature class, arcpy.AddField_management is used to add fields, and arcpy.InsertCursor is used to insert data row by row with a cursor; arcpy.conversion.PointToRaster is used to convert the point vector file into a raster file LEC.GIF;

使用ArcScene设置图层基本高度,生成LEC边界截面。Use ArcScene to set the layer base height and generate the LEC boundary section.

在本实施例中,自定义参数优化三维绿地景观;首先,利用arcpy库,将LEC计算结果转换为GeoTiff栅格文件。具体来说,通过arcpy.CreateFeatureclass_management创建点要素类,通过arcpy.AddField_management添加字段,通过arcpy.InsertCursor以游标按行插入数据,最后通过arcpy.conversion.PointToRaster将点矢量文件转换为栅格文件LEC.GIF。其次,利用ArcScene设置图层基本高度。导入景观高程连接度结果LEC.GIF和高程文件dem.GIF,右击LEC.GIF属性,Base Heights栏下选择在自定义表面dem.GIF上浮动。单击栅格分辨率,建议与LEC划分的等距2D网格一致。设置单位系数,该值越大,地形变化就越明显(建议设置为6)。图像效果还可以通过设置LEC.GIF的渲染属性进行调整,结合电脑条件进行选择。最后,生成LEC边界截面。使用【3D Analyst Tools】—【Conversion】—【FromRaster】—【Raster Domain】工具,输入栅格LEC.GIF,输出要素类类型选择Line类型,输出为domain。右击domain属性,Base Heights栏下选择在自定义表面dem.GIF上浮动,单位系数设置为6。Extrusion栏下勾选“在图层中挤出特征”,挤压值为-250(负数表示向下拉伸),挤压方式为“将其用作特征被挤压到的值”。In this embodiment, the three-dimensional green landscape is optimized by custom parameters; first, the arcpy library is used to convert the LEC calculation results into GeoTiff raster files. Specifically, a point feature class is created through arcpy.CreateFeatureclass_management, fields are added through arcpy.AddField_management, data is inserted row by row with a cursor through arcpy.InsertCursor, and finally the point vector file is converted into a raster file LEC.GIF through arcpy.conversion.PointToRaster. Secondly, ArcScene is used to set the base height of the layer. Import the landscape elevation connectivity result LEC.GIF and the elevation file dem.GIF, right-click the LEC.GIF properties, and select Float on the custom surface dem.GIF under the Base Heights column. Click the raster resolution, which is recommended to be consistent with the equidistant 2D grid divided by LEC. Set the unit coefficient. The larger the value, the more obvious the terrain changes (it is recommended to be set to 6). The image effect can also be adjusted by setting the rendering properties of LEC.GIF, and select it in combination with computer conditions. Finally, the LEC boundary section is generated. Use the [3D Analyst Tools] - [Conversion] - [FromRaster] - [Raster Domain] tool, input the raster LEC.GIF, select the Line type for the output feature class type, and output as domain. Right-click the domain property, select Float on the custom surface dem.GIF under the Base Heights column, and set the unit factor to 6. Check "Extrude features in layer" under the Extrusion column, set the extrusion value to -250 (negative numbers mean stretching downward), and the extrusion method to "Use this as the value to which the feature is extruded".

请参阅图5至图7,在本实施例中,以海南藏族自治州作为例子进行说明:Please refer to Figures 5 to 7. In this embodiment, Hainan Tibetan Autonomous Prefecture is used as an example for explanation:

步骤1:利用高级检索方法,按行政区“青海省-海南藏族自治州-兴海县”下载30mDEM数字高程数据产品(https://www.gscloud.cn/home),本例下载ASTGTMV003_N35E099影片。Step 1: Use the advanced search method to download the 30mDEM digital elevation data product (https://www.gscloud.cn/home) according to the administrative region "Qinghai Province-Hainan Tibetan Autonomous Prefecture-Xinghai County". In this example, the ASTGTMV003_N35E099 video is downloaded.

步骤2:在ArcMap中导入ASTGTMV003_N35E099_dem.GIF图层,新建多边形shapefile,选取高程起伏明显的区域绘制矩形并掩膜。结合电脑内存负荷状态,为了将后续计算栅格的行列数控制在1000左右,对ASTGTMV003_N35E099_dem.GIF重采样至cellsize (X,Y)等于(0.00083, 0.00083),最终导出为rec_dem.GIF。Step 2: Import the ASTGTMV003_N35E099_dem.GIF layer in ArcMap, create a new polygon shapefile, select the area with obvious elevation fluctuations, draw a rectangle and mask it. Combined with the computer memory load status, in order to control the number of rows and columns of the subsequent calculation grid to about 1000, resample ASTGTMV003_N35E099_dem.GIF to cellsize (X,Y) equal to (0.00083, 0.00083), and finally export it to rec_dem.GIF.

步骤3:栅格网格重投影。将栅格文件从经纬度坐标重新投影到WGS 84_UTM_zone_47N坐标系,对应EPSG代码为32647。指定投影后高程网格的分辨率为100 m,得到网格化的高程点矩阵(elev数组)。Step 3: Reproject the raster grid. Reproject the raster file from latitude and longitude coordinates to the WGS 84_UTM_zone_47N coordinate system, corresponding to the EPSG code 32647. Specify the resolution of the elevation grid after projection as 100 m, and obtain the gridded elevation point matrix (elev array).

步骤4:裁剪elev数组。由plotElevation (elev, 2500, 5500, topocmap)绘制elev数组,根据视图效果选择待裁剪的行、列数范围elev[0:500,0:800]并再次绘制。由np.ma.is_masked (elev[0:500,0:800])检查nodata值是否被完全删除。根据裁剪后的elev数组定义一个新的高程数组dem。Step 4: Crop the elev array. Plot the elev array with plotElevation (elev, 2500, 5500, topocmap), select the range of rows and columns to be cropped elev[0:500,0:800] according to the view effect and plot again. Check whether the nodata value is completely deleted with np.ma.is_masked (elev[0:500,0:800]). Define a new elevation array dem based on the cropped elev array.

步骤5:指定X和Y轴,创建X和Y坐标,将划分好的等距2D网格(dem数组)写入csv文件hnrec_100.csv。Step 5: Specify the X and Y axes, create the X and Y coordinates, and write the divided equidistant 2D grid (dem array) to the csv file hnrec_100.csv.

步骤6:定义高程数据的文件路径,调用函数init_landscapeConnectivity,传入高程数据文件路径,初始化计算所需的变量和数据。由computeLEC计算该区域景观高程连接度。Step 6: Define the file path of the elevation data, call the function init_landscapeConnectivity, pass in the elevation data file path, and initialize the variables and data required for calculation. The landscape elevation connectivity of the area is calculated by computeLEC.

步骤7:写入结果。调用函数writeLEC,将计算得到的LEC结果写入磁盘,保存为result_hainan.csv文件,并生成VTK可视化文件。Step 7: Write the results. Call the writeLEC function to write the calculated LEC results to disk, save them as result_hainan.csv file, and generate a VTK visualization file.

步骤8:查看结果。调用函数viewResult,生成并保存包含高程数据和LEC数据的图像,保存为plot_hainan.png文件。调用函数viewElevFrequency,生成并保存高程数据的频率直方图和密度图,保存为elev_freq_hainan.png文件,分辨率为300dpi。调用函数viewLECFrequency,生成并保存LEC随高程变化的散点图,保存为lec_freq_hainan.png文件,分辨率为300dpi。调用函数viewLECZbar,生成并保存LEC随高程变化的误差棒图和密度图,保存为lec_bar_hainan.png文件,分辨率为300dpi。Step 8: View the results. Call the viewResult function to generate and save an image containing elevation data and LEC data as plot_hainan.png. Call the viewElevFrequency function to generate and save a frequency histogram and density map of elevation data as elev_freq_hainan.png with a resolution of 300dpi. Call the viewLECFrequency function to generate and save a scatter plot of LEC versus elevation as lec_freq_hainan.png with a resolution of 300dpi. Call the viewLECZbar function to generate and save an error bar plot and density map of LEC versus elevation as lec_bar_hainan.png with a resolution of 300dpi.

步骤9:利用arcpy库,将LEC计算结果(result_hainan.csv)转换为GeoTiff栅格文件(hainan_LEC.GIF)。Step 9: Use the arcpy library to convert the LEC calculation results (result_hainan.csv) into a GeoTiff raster file (hainan_LEC.GIF).

步骤10:利用ArcScene设置图层浮动高度。导入景观高程连接度结果hainan_LEC.GIF和高程文件ASTGTMV003_N35E099_dem.GIF。首先,使用使用【Data ManagementTools】—【Projections and Transformations】—【Raster】—【Project Raster】工具,对图层ASTGTMV003_N35E099_dem.GIF重投影至WGS_1984_UTM_Zone_47N,另存为N35E099_demUTM47.GIF。其次,右击hainan_LEC.GIF属性,Base Heights栏下选择在自定义表面N35E099_demUTM47.GIF上浮动,单击栅格分辨率设置为100 m(与LEC划分的等距2D网格一致)。设置单位系数值为6。Rendering栏下调整滑块使栅格图像质量最高,同时使最低透明度阈值最低。最后,右击N35E099_demUTM47.GIF属性,Base Heights栏下选择在自定义表面N35E099_demUTM47.GIF上浮动,单击栅格分辨率设置为30 m。设置单位系数值为3。Rendering栏下调整滑块使栅格图像质量最高,同时使最低透明度阈值最低。Step 10: Use ArcScene to set the floating height of the layer. Import the landscape elevation connectivity result hainan_LEC.GIF and the elevation file ASTGTMV003_N35E099_dem.GIF. First, use the [Data ManagementTools]-[Projections and Transformations]-[Raster]-[Project Raster] tool to reproject the layer ASTGTMV003_N35E099_dem.GIF to WGS_1984_UTM_Zone_47N and save it as N35E099_demUTM47.GIF. Second, right-click hainan_LEC.GIF properties, select Floating on custom surface N35E099_demUTM47.GIF under the Base Heights column, and click the raster resolution to set it to 100 m (consistent with the equidistant 2D grid divided by LEC). Set the unit coefficient value to 6. Adjust the slider under the Rendering column to maximize the raster image quality and minimize the minimum transparency threshold. Finally, right-click on N35E099_demUTM47.GIF Properties, select Float on Custom Surface N35E099_demUTM47.GIF under Base Heights, click on the grid resolution and set it to 30 m. Set the Unit Factor value to 3. Under Rendering, adjust the slider to make the raster image quality the highest and the minimum transparency threshold the lowest.

步骤11:生成LEC边界截面。使用【3D Analyst Tools】—【Conversion】—【FromRaster】—【Raster Domain】工具,输入栅格hainan_LEC.GIF,输出要素类类型选择Line类型,输出为domain。右击domain属性,Base Heights栏下选择在自定义表面N35E099_demUTM47.GIF上浮动,单位系数设置为6。Extrusion栏下勾选“在图层中挤出特征”,挤压值为-250(负数表示向下拉伸),挤压方式为“将其用作特征被挤压到的值”。Step 11: Generate LEC boundary section. Use [3D Analyst Tools] — [Conversion] — [FromRaster] — [Raster Domain] tool, input raster hainan_LEC.GIF, select Line type as output feature class type, and output as domain. Right-click domain properties, select Float on custom surface N35E099_demUTM47.GIF under Base Heights column, and set the unit factor to 6. Check "Extrude features in layer" under Extrusion column, set the extrusion value to -250 (negative number means stretching downward), and the extrusion method is "Use it as the value to which the feature is extruded".

请参阅图7至图10,在本实施例中,以湖州市作为例子再次进行说明:Please refer to Figures 7 to 10. In this embodiment, Huzhou City is used as an example to illustrate again:

步骤1:利用高级检索方法,按行政区“浙江省-湖州市-安吉县”下载30m DEM数字高程数据产品(https://www.gscloud.cn/home),本例下载ASTGTMV003_N30E119影片。Step 1: Use the advanced search method to download the 30m DEM digital elevation data product (https://www.gscloud.cn/home) according to the administrative region "Zhejiang Province-Huzhou City-Anji County". In this example, the ASTGTMV003_N30E119 video is downloaded.

步骤2:在ArcMap中导入ASTGTMV003_N30E119_dem.GIF图层,新建多边形shapefile,选取高程起伏明显的区域绘制矩形并掩膜。结合电脑内存负荷状态,为了将后续计算栅格的行列数控制在1000左右,对ASTGTMV003_N30E119_dem.GIF重采样至cellsize (X,Y)等于(0.00083, 0.00083),最终导出为rec_dem.GIF。Step 2: Import the ASTGTMV003_N30E119_dem.GIF layer in ArcMap, create a new polygon shapefile, select the area with obvious elevation fluctuations, draw a rectangle and mask it. Combined with the computer memory load status, in order to control the number of rows and columns of the subsequent calculation grid to about 1000, resample ASTGTMV003_N30E119_dem.GIF to cellsize (X,Y) equal to (0.00083, 0.00083), and finally export it to rec_dem.GIF.

步骤3:栅格网格重投影。将栅格文件从经纬度坐标重新投影到WGS 84_UTM_zone_50N坐标系,对应EPSG代码为32650。指定投影后高程网格的分辨率为100 m,得到网格化的高程点矩阵(elev数组)。Step 3: Reproject the raster grid. Reproject the raster file from latitude and longitude coordinates to the WGS 84_UTM_zone_50N coordinate system, corresponding to the EPSG code 32650. Specify the resolution of the elevation grid after projection as 100 m, and obtain the gridded elevation point matrix (elev array).

步骤4:裁剪elev数组。由plotElevation (elev, 0, 1600, topocmap)绘制elev数组,根据视图效果选择待裁剪的行、列数范围elev[20:800, 50:800]并再次绘制。由np.ma.is_masked (elev[20:800, 50:800])检查nodata值是否被完全删除。根据裁剪后的elev数组定义一个新的高程数组dem。Step 4: Crop the elev array. Plot the elev array with plotElevation (elev, 0, 1600, topocmap), select the range of rows and columns to be cropped elev[20:800, 50:800] according to the view effect and plot again. Check whether the nodata value is completely deleted with np.ma.is_masked (elev[20:800, 50:800]). Define a new elevation array dem based on the cropped elev array.

步骤5:指定X和Y轴,创建X和Y坐标,将划分好的等距2D网格(dem数组)写入csv文件hzrec_100.csv。Step 5: Specify the X and Y axes, create X and Y coordinates, and write the divided equidistant 2D grid (dem array) to the csv file hzrec_100.csv.

步骤6:定义高程数据的文件路径,调用函数init_landscapeConnectivity,传入高程数据文件路径,初始化计算所需的变量和数据。由computeLEC计算该区域景观高程连接度。Step 6: Define the file path of the elevation data, call the function init_landscapeConnectivity, pass in the elevation data file path, and initialize the variables and data required for calculation. The landscape elevation connectivity of the area is calculated by computeLEC.

步骤7:写入结果。调用函数writeLEC,将计算得到的LEC结果写入磁盘,保存为result_huzhou.csv文件,并生成VTK可视化文件。Step 7: Write the results. Call the writeLEC function to write the calculated LEC results to disk, save them as result_huzhou.csv file, and generate a VTK visualization file.

步骤8:查看结果。调用函数viewResult,生成并保存包含高程数据和LEC数据的图像,保存为plot_huzhou.png文件。调用函数viewElevFrequency,生成并保存高程数据的频率直方图和密度图,保存为elev_freq_huzhou.png文件,分辨率为300dpi。调用函数viewLECFrequency,生成并保存LEC随高程变化的散点图,保存为lec_freq_huzhou.png文件,分辨率为300dpi。调用函数viewLECZbar,生成并保存LEC随高程变化的误差棒图和密度图,保存为lec_bar_huzhou.png文件,分辨率为300dpi。Step 8: View the results. Call the viewResult function to generate and save an image containing elevation data and LEC data as plot_huzhou.png file. Call the viewElevFrequency function to generate and save the frequency histogram and density map of elevation data as elev_freq_huzhou.png file with a resolution of 300dpi. Call the viewLECFrequency function to generate and save a scatter plot of LEC versus elevation as lec_freq_huzhou.png file with a resolution of 300dpi. Call the viewLECZbar function to generate and save an error bar plot and density map of LEC versus elevation as lec_bar_huzhou.png file with a resolution of 300dpi.

步骤9:利用arcpy库,将LEC计算结果(result_huzhou.csv)转换为GeoTiff栅格文件(huzhou_LEC.GIF)。Step 9: Use the arcpy library to convert the LEC calculation results (result_huzhou.csv) into a GeoTiff raster file (huzhou_LEC.GIF).

步骤10:利用ArcScene设置图层浮动高度。导入景观高程连接度结果huzhou_LEC.GIF和高程文件ASTGTMV003_N30E119_dem.GIF。首先,使用使用【Data ManagementTools】—【Projections and Transformations】—【Raster】—【Project Raster】工具,对图层ASTGTMV003_N30E119_dem.GIF重投影至WGS_1984_UTM_Zone_50N,另存为N30E119_demUTM50.GIF。其次,右击huzhou_LEC.GIF属性,Base Heights栏下选择在自定义表面N30E119_demUTM50.GIF上浮动,单击栅格分辨率设置为100 m(与LEC划分的等距2D网格一致)。设置单位系数值为6。Rendering栏下调整滑块使栅格图像质量最高,同时使最低透明度阈值最低。最后,右击N30E119_demUTM50.GIF属性,Base Heights栏下选择在自定义表面N30E119_demUTM50.GIF上浮动,单击栅格分辨率设置为30 m。设置单位系数值为3。Rendering栏下调整滑块使栅格图像质量最高,同时使最低透明度阈值最低。Step 10: Use ArcScene to set the floating height of the layer. Import the landscape elevation connectivity result huzhou_LEC.GIF and the elevation file ASTGTMV003_N30E119_dem.GIF. First, use the [Data ManagementTools]-[Projections and Transformations]-[Raster]-[Project Raster] tool to reproject the layer ASTGTMV003_N30E119_dem.GIF to WGS_1984_UTM_Zone_50N and save it as N30E119_demUTM50.GIF. Second, right-click on the huzhou_LEC.GIF properties, select Floating on the custom surface N30E119_demUTM50.GIF under the Base Heights column, and click the raster resolution to set it to 100 m (consistent with the equidistant 2D grid divided by LEC). Set the unit coefficient value to 6. Adjust the slider under the Rendering column to maximize the raster image quality and minimize the minimum transparency threshold. Finally, right-click on N30E119_demUTM50.GIF Properties, select Float on Custom Surface N30E119_demUTM50.GIF under Base Heights, click on the grid resolution and set it to 30 m. Set the Unit Factor value to 3. Under Rendering, adjust the slider to make the raster image quality the highest and the minimum transparency threshold the lowest.

步骤11:生成LEC边界截面。使用【3D Analyst Tools】—【Conversion】—【FromRaster】—【Raster Domain】工具,输入栅格huzhou_LEC.GIF,输出要素类类型选择Line类型,输出为domain。右击domain属性,Base Heights栏下选择在自定义表面N30E119_demUTM50.GIF上浮动,单位系数设置为6。Extrusion栏下勾选“在图层中挤出特征”,挤压值为-250(负数表示向下拉伸),挤压方式为“将其用作特征被挤压到的值”。Step 11: Generate LEC boundary section. Use [3D Analyst Tools] — [Conversion] — [FromRaster] — [Raster Domain] tool, input raster huzhou_LEC.GIF, select Line type as output feature class type, and output as domain. Right-click domain attribute, select Float on custom surface N30E119_demUTM50.GIF under Base Heights column, and set the unit factor to 6. Check "Extrude features in layer" under Extrusion column, set the extrusion value to -250 (negative number means downward stretching), and the extrusion method is "Use it as the value to which the feature is extruded".

所述基于景观高程连接度的三维绿地优化建模方法旨在融入山地景观的海拔变化情况,充分反映在未来气候变化驱动下物种生境沿海拔梯度迁徙的潜在廊道,提供一种基于景观高程连接度的三维绿地优化建模方法,并利用代码编写能实现全流程自动化处理的模块。借鉴生态网络的核心内涵,主要解决1.打破传统景观连接度建模技术套路,考虑物种实际运动过程,量化海拔梯度促进或阻碍物种迁徙的能力。2.自定义参数优化三维建模,参数能够科学表征区域地势地貌特征两个技术问题。The three-dimensional green space optimization modeling method based on landscape elevation connectivity aims to integrate the altitude changes of mountain landscapes, fully reflect the potential corridors for species habitat migration along altitude gradients driven by future climate change, provide a three-dimensional green space optimization modeling method based on landscape elevation connectivity, and use code to write a module that can realize full-process automation. Drawing on the core connotation of the ecological network, the main solutions are: 1. Breaking the traditional landscape connectivity modeling technology routine, considering the actual movement process of species, and quantifying the ability of altitude gradients to promote or hinder species migration. 2. Customized parameter optimization three-dimensional modeling, parameters can scientifically characterize the characteristics of regional topography and geomorphology.

综上所述,目前亟需通过三维重构技术实现物种沿海拔梯度迁徙路径的立体空间优化,为开展山地物种应对气候变化的适应性策略研究提供技术支撑。在理想状态下,基于海拔梯度的三维山地生态网络的优化将减少物种暴露于宏观气候变暖和极端高温事件的风险。本方法在充分考虑山地生态系统多样性与地理空间复杂性前提下,定量评估海拔梯度对物种迁徙的促进-抑制耦合作用,构建高分辨率三维绿地景观优化模型,揭示了生物多样性分布格局的自适应三维生态网络,解析气候变化驱动下山地景观优先保护区。In summary, there is an urgent need to achieve three-dimensional spatial optimization of species migration paths along altitude gradients through three-dimensional reconstruction technology, so as to provide technical support for the study of adaptive strategies of mountain species to cope with climate change. Ideally, the optimization of three-dimensional mountain ecological networks based on altitude gradients will reduce the risk of species exposure to macroclimate warming and extreme high temperature events. This method quantitatively evaluates the promotion-inhibition coupling effect of altitude gradients on species migration, constructs a high-resolution three-dimensional green space landscape optimization model, reveals the adaptive three-dimensional ecological network of biodiversity distribution pattern, and analyzes the priority protection areas of mountain landscapes driven by climate change, while fully considering the diversity and geographic spatial complexity of mountain ecosystems.

请参阅图11,本发明第二实施例还提供了一种基于景观高程连接度的三维绿地优化建模装置,其包括:Referring to FIG. 11 , the second embodiment of the present invention further provides a three-dimensional green space optimization modeling device based on landscape elevation connectivity, which includes:

结构构建单元201,用于获取预设的最小假设集原理,根据所述最小假设集原理构建集合群落结构,生成CSV文件,其中,集合群落结构是由属于S种不同物种的N个局部群落×n个个体的局部群落组织组成,局部群落组织在一个等间距的2D网格中,每个网格单元假设海拔为唯一生态位特征,当物种移动至不同的网格单元时,对应不同的海拔适宜度;The structure construction unit 201 is used to obtain a preset minimum hypothesis set principle, construct a metacommunity structure according to the minimum hypothesis set principle, and generate a CSV file, wherein the metacommunity structure is composed of local community organizations of N local communities × n individuals belonging to S different species, and the local community organizations are organized in an equally spaced 2D grid, and each grid unit assumes that the altitude is a unique niche feature. When the species moves to different grid units, it corresponds to different altitude suitability;

绘制单元202,用于根据CSV文件和Dijkstra方法计算景观高程连接度结果,并绘制景观高程连接度结果的直方图、散点图、折线图、密度图;A drawing unit 202 is used to calculate the landscape elevation connectivity result according to the CSV file and the Dijkstra method, and draw a histogram, a scatter plot, a line graph, and a density map of the landscape elevation connectivity result;

边界截面生成单元203,用于对景观高程连接度结果进行转换处理,设置图层基本高度,生成LEC边界截面;The boundary section generating unit 203 is used to convert the landscape elevation connectivity result, set the layer basic height, and generate the LEC boundary section;

所述最小假设集原理包括:The minimum hypothesis set principle includes:

每个物种的个体具有取决于海拔的适合度,所有其他生命率是相同的,其中,这种情况下的竞争能力公式为:Individuals of each species have a fitness that depends on altitude, all other vital rates being equal, where the formula for competitive ability is:

其中,为个体位于海拔时,最大的竞争能力,反映了物种i的个体在海拔z处的竞争能力,为物种i的生态位位置,为生态位宽度;in, For individuals at altitude The greatest competitiveness, reflects the competitive ability of individuals of species i at altitude z, is the ecological niche position of species i, is the niche width;

不同物种具有不同的生态位位置,但生态位宽度相同;Different species have different niche positions, but the same niche breadth;

生态位位置沿域的海拔范围均匀分布,在集合群落尺度上不存在优先海拔;Niche positions were evenly distributed along the elevation range of the domain, and there was no preferred elevation at the metacommunity scale;

分散是各向同性的;The dispersion is isotropic;

每个局部群落的栖息地容量恒定为n;The habitat capacity of each local community is constant, n;

根据CSV文件和Dijkstra方法计算景观高程连接度结果,具体为:The landscape elevation connectivity results are calculated based on the CSV file and the Dijkstra method, as follows:

基于CSV文件,构造函数init_landscapeConnectivity(filename, sigmap=0.1,sigmav=None, connected=True, delimiter=' ', sl=-1.e6, test=False),定义假设生态位的宽度,并计算最小路径的参数,其中,filename (str)为包含规则间距高程网格的CSV文件名,sigmap(float)为基于海拔高度的物种生态位宽度百分比,sigmav (float)为物种生态位固定宽度值,connected (bool)为根据对角线移动和轴向移动计算路径,delimiter (str)为高程网格CSV分隔符,sl (float)为用于从LEC计算中移除海洋点的海平面位置;Based on the CSV file, the constructor init_landscapeConnectivity(filename, sigmap=0.1,sigmav=None, connected=True, delimiter=' ', sl=-1.e6, test=False) defines the width of the hypothesized niche and calculates the parameters of the minimum path, where filename (str) is the name of the CSV file containing the regularly spaced elevation grid, sigmap (float) is the percentage of species niche width based on altitude, sigmav (float) is the fixed width value of the species niche, connected (bool) is the path calculated based on diagonal and axial movement, delimiter (str) is the elevation grid CSV delimiter, and sl (float) is the sea level position used to remove ocean points from the LEC calculation;

根据最小路径的参数,构造函数computeMinPath(r, c),计算特定节点与所有其他节点之间的最小路径,根据考虑的节点和所有其他顶点之间的高程差的平方创建成本曲面,从权重面创建一个“landscape graph”对象,使用距离加权最小成本路径进行分析,计算从起始单元格到所有其他单元格的最小成本距离,生成景观高程连接度结果,其中,在景观高程连接度值中,借助scikit-image库中Dijkstra算法计算成本最低的距离,r为二维数组dem的行索引,c为二维数组dem的列索引;According to the parameters of the minimum path, the constructor computeMinPath(r, c) calculates the minimum path between a specific node and all other nodes, creates a cost surface based on the square of the elevation difference between the considered node and all other vertices, creates a "landscape graph" object from the weighted surface, uses the distance-weighted minimum cost path for analysis, calculates the minimum cost distance from the starting cell to all other cells, and generates the landscape elevation connectivity result, where, in the landscape elevation connectivity value, the distance with the lowest cost is calculated with the help of the Dijkstra algorithm in the scikit-image library, r is the row index of the two-dimensional array dem, and c is the column index of the two-dimensional array dem;

其中,景观高程连接度结果的公式为:Among them, the formula for the landscape elevation connectivity result is:

其中,表示任意一个局部群落站点i处的景观高程连接度,为站点处的海拔,为物种的最适生态位位置,为物种的生态位宽幅,度量了站点j与站点i之间高程适宜度的接近程度,j可以是N×n集合群落结构中任一局部群落站点,度量了沿路径p从群路j到i的接近程度,k1,k2,...,kL是路径p包含的所有群落站点,k1= j,kL= i。in, represents the landscape elevation connectivity at any local community site i, For Site The altitude of is the optimal ecological niche position of the species, is the niche breadth of the species, It measures the closeness of the elevation suitability between site j and site i, where j can be any local community site in the N×n metacommunity structure. It measures the proximity from cluster j to i along path p, where k 1 , k 2 , ..., k L are all cluster sites included in path p, k 1 = j, k L = i.

本发明第三实施例还提供了一种基于景观高程连接度的三维绿地优化建模设备,其特征在于,包括存储器以及处理器,所述存储器内存储有计算机程序,所述计算机程序能够被所述处理器执行,以实现如上任意一项所述的基于景观高程连接度的三维绿地优化建模方法。The third embodiment of the present invention also provides a three-dimensional green space optimization modeling device based on landscape elevation connectivity, characterized in that it includes a memory and a processor, the memory stores a computer program, and the computer program can be executed by the processor to implement the three-dimensional green space optimization modeling method based on landscape elevation connectivity as described in any one of the above items.

本发明第四实施例还提供了一种计算机可读存储介质,其特征在于,存储有计算机程序,所述计算机程序能够被所述计算机可读存储介质所在设备的处理器执行,以实现如上任意一项所述的基于景观高程连接度的三维绿地优化建模方法。The fourth embodiment of the present invention also provides a computer-readable storage medium, characterized in that a computer program is stored therein, and the computer program can be executed by a processor of the device where the computer-readable storage medium is located to implement the three-dimensional green space optimization modeling method based on landscape elevation connectivity as described in any one of the above items.

以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims (7)

1. A three-dimensional green land optimization modeling method based on landscape elevation connectivity is characterized by comprising the following steps:
Acquiring a preset minimum hypothesis set principle, constructing an aggregate community structure according to the minimum hypothesis set principle, and generating a CSV file, wherein the aggregate community structure is composed of local community tissues of N local communities of N individuals belonging to S different species, the local community tissues are in an equidistant 2D grid, each grid unit assumes that the altitude is a unique ecological niche characteristic, and when the species move to different grid units, the altitude fitness is different correspondingly;
calculating a landscape elevation connectivity result according to the CSV file and the Dijkstra method, and drawing a histogram, a scatter diagram, a line diagram and a density diagram of the landscape elevation connectivity result;
converting the landscape elevation connectivity result, setting the basic height of a layer, and generating an LEC boundary section;
The minimum hypothesis set theory includes:
the individual of each species has an altitude-dependent fitness, all other vital rates being the same, wherein the competition ability formula in this case is:
Wherein, For individuals at altitudeIn the time, the maximum competitive power,Reflecting the competence of the individual of species i at altitude z,For the niche position of species i,Is the width of the ecological niche;
different species have different niche locations, but the niche width is the same;
the ecological niche positions are uniformly distributed along the elevation range of the domain, and no preferential elevation exists on the scale of the aggregate community;
The dispersion is isotropic;
The habitat capacity of each local community is constant at n;
according to CSV file and Dijkstra method, calculating the result of the landscape elevation connectivity, specifically:
Based on the CSV file, the constructor init_landscapeConnectivity(filename, sigmap=0.1, sigmav=None, connected=True, delimiter=' ', sl=-1.e6, test=False), defines the width of the hypothetical niche and calculates the parameters of the minimum path, where filename (str) is the CSV file name containing the regular-pitch elevation grid, sigmap (float) is the percentage of the width of the species niche based on altitude, sigmav (float) is the fixed width value of the species niche, connected (bool) is the calculated path according to diagonal movement and axial movement, DELIMITER (STR) is the elevation grid CSV separator, sl (float) is the sea level position for removing the ocean point from LEC calculation;
Constructing a function computeMinPath (r, c) according to parameters of the minimum path, calculating the minimum path between a specific node and all other nodes, creating a cost curved surface according to the square of the elevation difference between the considered node and all other vertexes, creating a 'LANDSCAPE GRAPH' object from the weight surface, analyzing by using the distance weighted minimum cost path, calculating the minimum cost distance from the initial cell to all other cells, and generating a landscape elevation connectivity result, wherein in the landscape elevation connectivity value, the distance with the lowest cost is calculated by means of Dijkstra algorithm in scikit-image library, r is the row index of the two-dimensional array dem, and c is the column index of the two-dimensional array dem;
the formula of the landscape elevation connectivity result is as follows:
Wherein, Representing the landscape elevation connectivity at any one local community site i,For a stationThe altitude at which the altitude is to be set,Is the most suitable ecological niche position of the species,Is the wide range of the ecological niches of the species,The approach degree of the elevation suitability between the sites j and the sites i is measured, wherein j can be any local community site in the N multiplied by N aggregate community structure,The proximity from cluster j to i along path p is measured, k 1,k2 ,...,kL is all the cluster sites contained by path p, k 1 = j,kL =i.
2. The three-dimensional green land optimization modeling method based on landscape elevation connectivity of claim 1, wherein a preset minimum hypothesis set principle is obtained, a set community structure is constructed according to the minimum hypothesis set principle, and a CSV file is generated specifically as follows:
Acquiring a preset minimum hypothesis set principle, re-projecting a grid file from longitude and latitude coordinates to a WGS 84_UTM coordinate system based on the minimum hypothesis set principle, searching a corresponding EPSG code, designating the resolution of an elevation grid after projection, and obtaining a gridded elevation point matrix which is named as elev array;
Constructing a function plotElevation (data, cmin, cmax, colorimap) to draw an image of an initial elev array, selecting a range of row numbers and column numbers from a elev array according to view effects of the image, deleting nodata values caused by reprojection, and defining a new elevation array dem according to the cut elev array, wherein data is a dataset dem to be drawn, cmin and cmax are a range of color mapping, and colorimap is a color mapping table to be used;
Designating an X axis and a Y axis based on an elevation array dem, creating an X coordinate and a Y coordinate, and reducing resolution by using step parameters to obtain a divided equidistant 2D grid;
and writing the divided equidistant 2D grids into a CSV file to obtain a colony aggregation structure.
3. The three-dimensional green space optimization modeling method based on the landscape elevation connectivity of claim 1, wherein a histogram, a scatter plot, a line plot, a density plot of landscape elevation connectivity results are drawn:
Constructing a function splitRowWise (), splitting a calculation domain according to rows, and calculating a minimum cost path of points belonging to each subdomain by using a Dijkstra algorithm in the whole area by using message passing interfaces MPI distributed on a plurality of processors;
Constructing a function_test_progress (progress), calculating and displaying a progress bar according to a progress parameter to dynamically update progress information, and displaying 'DONE' when a job is completed, wherein the job_title is the name of a currently executing task, the progress is a floating point number between 0 and 1, 0 represents that the task just starts, and 1 represents that the task is completed;
constructing a function computeLEC (fout=500), calling functions computeMinPath (), splitRowWise (), test_progress (), dividing an array imported by a csv file according to a row, calculating the proximity of each node in a similar elevation range by the row to obtain a two-dimensional array representing the landscape height connectivity, and storing the array to a working environment by the csv file;
Constructing a function writeLEC (filename= 'LECout'), storing a landscape elevation connectivity result and original elevation data into a disk, converting the data from a 2D array into a 1D array in an MPI parallel computing environment, creating DATAFRAME to be stored as a csv file, and storing the csv file as a vtk file by using a gridToVTK function;
Constructing a function viewResult (imName =none, size, fsize, cmap, cmap, dpi), creating an image window comprising two sub-images, displaying Elevation data on a first sub-image, adding color bars, displaying landscape Elevation connectivity data on a second sub-image, adding color bars, and automatically adjusting the layout of the sub-images, adding an image title, wherein size is the size of the drawing window, fsize is the size of the font, cmap is the color mapping table of the first image Elevation, cmap is the color mapping table of the second image LEC, dpi is the image resolution;
constructing a function viewElevFrequency (input=none, imName =none, nbins, size, fsize, dpi), reading data from a specified CSV file, calculating the minimum value of elevation data, when the minimum value is judged to be lower than sea level, creating a histogram of the elevation data by using the sea level value, setting a title and a label, adding a density map of the elevation data on the same map, and setting the title and the label, wherein nbins is the columnar number bin in the histogram, namely dividing the data into a plurality of intervals;
Constructing a function viewLECFrequency (input=none, imName =none, size, fsize, dpi), reading data from a specified CSV file, calculating a minimum value of elevation data, creating a scatter diagram of LEC data using sea level values when the minimum value is determined to be below sea level, and setting a title and a label;
Constructing a function viewLECZbar (input=none, imName =none, nbins, size, fsize, dpi), reading data from a specified CSV file, calculating a histogram of elevation data, calculating a weighted histogram and a square weight histogram according to LEC data, calculating an average value and a standard deviation of each bin, and drawing a line graph and a scatter graph of elevation and LEC average value; and drawing an error bar for representing the standard deviation of each bin, creating a new y-axis sharing the x-axis, drawing a density map of elevation data, and setting the sizes of the image title, the label and the scale fonts.
4. The three-dimensional green space optimization modeling method based on the landscape elevation connectivity of claim 1, wherein the conversion processing is performed on the landscape elevation connectivity result, the basic height of a layer is set, and LEC boundary sections are generated, specifically:
Converting the landscape elevation connectivity result into GeoTiff grid files by utilizing a arcpy library, wherein point element classes are created by using arcpy.CreateFeaturescope_management, fields are added by using arcpy.AddField_management, and data are inserted in rows by using arcpy.InsertCursor; converting the point vector file into a grid file lec. Tif by using arcpy.
The LEC boundary cross-section is generated using ArcScene to set the layer base height.
5. A three-dimensional green space optimization modeling device based on landscape elevation connectivity, for implementing the three-dimensional green space optimization modeling method based on landscape elevation connectivity as claimed in claim 1, comprising:
The structure construction unit is used for acquiring a preset minimum hypothesis set principle, constructing a set community structure according to the minimum hypothesis set principle and generating a CSV file, wherein the set community structure is composed of local community tissues of N local communities of N individuals belonging to S different species, the local community tissues are in an equidistant 2D grid, each grid unit assumes that the elevation is a unique ecological niche characteristic, and when the species move to different grid units, the elevation fitness is different correspondingly;
The drawing unit is used for calculating a landscape elevation connectivity result according to the CSV file and the Dijkstra method, and drawing a histogram, a scatter diagram, a line diagram and a density diagram of the landscape elevation connectivity result;
the boundary section generating unit is used for converting the landscape elevation connectivity result, setting the basic height of the layer and generating an LEC boundary section;
The minimum hypothesis set theory includes:
the individual of each species has an altitude-dependent fitness, all other vital rates being the same, wherein the competition ability formula in this case is:
Wherein, For individuals at altitudeIn the time, the maximum competitive power,Reflecting the competence of the individual of species i at altitude z,For the niche position of species i,Is the width of the ecological niche;
different species have different niche locations, but the niche width is the same;
the ecological niche positions are uniformly distributed along the elevation range of the domain, and no preferential elevation exists on the scale of the aggregate community;
The dispersion is isotropic;
The habitat capacity of each local community is constant at n;
according to CSV file and Dijkstra method, calculating the result of the landscape elevation connectivity, specifically:
Based on the CSV file, the constructor init_landscapeConnectivity(filename, sigmap=0.1, sigmav=None, connected=True, delimiter=' ', sl=-1.e6, test=False), defines the width of the hypothetical niche and calculates the parameters of the minimum path, where filename (str) is the CSV file name containing the regular-pitch elevation grid, sigmap (float) is the percentage of the width of the species niche based on altitude, sigmav (float) is the fixed width value of the species niche, connected (bool) is the calculated path according to diagonal movement and axial movement, DELIMITER (STR) is the elevation grid CSV separator, sl (float) is the sea level position for removing the ocean point from LEC calculation;
Constructing a function computeMinPath (r, c) according to parameters of the minimum path, calculating the minimum path between a specific node and all other nodes, creating a cost curved surface according to the square of the elevation difference between the considered node and all other vertexes, creating a 'LANDSCAPE GRAPH' object from the weight surface, analyzing by using the distance weighted minimum cost path, calculating the minimum cost distance from the initial cell to all other cells, and generating a landscape elevation connectivity result, wherein in the landscape elevation connectivity value, the distance with the lowest cost is calculated by means of Dijkstra algorithm in scikit-image library, r is the row index of the two-dimensional array dem, and c is the column index of the two-dimensional array dem;
the formula of the landscape elevation connectivity result is as follows:
Wherein, Representing the landscape elevation connectivity at any one local community site i,For a stationThe altitude at which the altitude is to be set,Is the most suitable ecological niche position of the species,Is the wide range of the ecological niches of the species,The approach degree of the elevation suitability between the sites j and the sites i is measured, wherein j can be any local community site in the N multiplied by N aggregate community structure,The proximity from cluster j to i along path p is measured, k 1,k2 ,...,kL is all the cluster sites contained by path p, k 1 = j,kL =i.
6. A three-dimensional green space optimization modeling device based on landscape elevation connectivity, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor to implement the three-dimensional green space optimization modeling method based on landscape elevation connectivity as claimed in any one of claims 1 to 4.
7. A computer readable storage medium, wherein a computer program is stored, and the computer program can be executed by a processor of a device where the computer readable storage medium is located, so as to implement the three-dimensional green space optimization modeling method based on landscape elevation connectivity according to any one of claims 1 to 4.
CN202411252995.0A 2024-09-09 2024-09-09 Three-dimensional green land optimization modeling method, device, equipment and medium based on landscape elevation connectivity Active CN118799499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411252995.0A CN118799499B (en) 2024-09-09 2024-09-09 Three-dimensional green land optimization modeling method, device, equipment and medium based on landscape elevation connectivity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411252995.0A CN118799499B (en) 2024-09-09 2024-09-09 Three-dimensional green land optimization modeling method, device, equipment and medium based on landscape elevation connectivity

Publications (2)

Publication Number Publication Date
CN118799499A true CN118799499A (en) 2024-10-18
CN118799499B CN118799499B (en) 2024-12-03

Family

ID=93028059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411252995.0A Active CN118799499B (en) 2024-09-09 2024-09-09 Three-dimensional green land optimization modeling method, device, equipment and medium based on landscape elevation connectivity

Country Status (1)

Country Link
CN (1) CN118799499B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342911A (en) * 2021-05-19 2021-09-03 武汉大学 Landscape connectivity evaluation method considering network time-space dynamic relation
US20220108186A1 (en) * 2020-10-02 2022-04-07 Francisco Daniel Filip Duarte Niche Ranking Method
CN116307400A (en) * 2023-04-03 2023-06-23 吉林省林业科学研究院 Method and device for identifying habitat corridor, electronic equipment and medium
CN118379452A (en) * 2024-04-30 2024-07-23 上海漂视网络股份有限公司 Method for automatically modeling surface environment of landform according to slope direction of landform
CN118427507A (en) * 2024-04-17 2024-08-02 甘肃兴隆山国家级自然保护区管护中心 Biological positioning monitoring research method for protecting extremely small population of cymbidium sinense in protection area

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220108186A1 (en) * 2020-10-02 2022-04-07 Francisco Daniel Filip Duarte Niche Ranking Method
CN113342911A (en) * 2021-05-19 2021-09-03 武汉大学 Landscape connectivity evaluation method considering network time-space dynamic relation
CN116307400A (en) * 2023-04-03 2023-06-23 吉林省林业科学研究院 Method and device for identifying habitat corridor, electronic equipment and medium
CN118427507A (en) * 2024-04-17 2024-08-02 甘肃兴隆山国家级自然保护区管护中心 Biological positioning monitoring research method for protecting extremely small population of cymbidium sinense in protection area
CN118379452A (en) * 2024-04-30 2024-07-23 上海漂视网络股份有限公司 Method for automatically modeling surface environment of landform according to slope direction of landform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵鸣飞;薛峰;王宇航;王国义;邢开雄;康慕谊;王菁兰;: "山西芦芽山针叶林草本层群落谱系结构与多样性的海拔格局", 植物生态学报, no. 07, 10 July 2017 (2017-07-10) *

Also Published As

Publication number Publication date
CN118799499B (en) 2024-12-03

Similar Documents

Publication Publication Date Title
Darrel Jenerette et al. Global analysis and simulation of land-use change associated with urbanization
Widanagamaachchi et al. Interactive exploration of large-scale time-varying data using dynamic tracking graphs
CN110992469B (en) Visualization method and system for massive 3D model data
CN102663801B (en) Method for improving three-dimensional model rendering performance
Chauvier-Mendes et al. Transnational conservation to anticipate future plant shifts in Europe
CA2846327C (en) Systems and methods for generating a large scale polygonal mesh
KR20100136604A (en) 3D Terrain Image Real-Time Visualization System and Its Method
CN105336003A (en) Three-dimensional terrain model real-time smooth drawing method with combination of GPU technology
Drielsma et al. A raster-based technique for analysing habitat configuration: The cost–benefit approach
Scheiblauer et al. Out-of-core selection and editing of huge point clouds
CN115687675A (en) Airborne vector map data processing method
CN113468286A (en) Three-dimensional pyramid construction method based on triangular patch number division
Yan et al. An object-based analysis filtering algorithm for airborne laser scanning
WO2013055914A2 (en) Systems and methods for creating texture exemplars
CN112579677B (en) Automatic processing method for satellite remote sensing image
CN114898043A (en) Laser point cloud data tile construction method
Domingues et al. Optimized allocation of forest restoration zones to minimize soil losses in watersheds
Kaya et al. Modelling 3D spatial enclosure of urban open spaces
Tapia et al. Optimization of sampling schemes for vegetation mapping using fuzzy classification
CN118799499B (en) Three-dimensional green land optimization modeling method, device, equipment and medium based on landscape elevation connectivity
Telea et al. Visualization of generalized voronoi diagrams
US20230298291A1 (en) Voxel-based approach for design models
CN111475969B (en) A Large-scale Crowd Behavior Simulation System
Abbott et al. Parallel individual-based modeling of Everglades deer ecology
CN113495935A (en) Terrain slicing method and system based on irregular triangularization mesh generation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant