Method for calculating land homogeneity based on open source spatial database PostGIS

A calculation method and homogeneity technology, which is applied in data processing applications, geographic information databases, special data processing applications, etc., can solve problems such as the inability to eliminate three-dimensional information, achieve fast and efficient calculations, increase computing speed, and improve efficiency Effect

Pending Publication Date: 2021-03-12
0 Cites 0 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0042] Technical problem: From the research background, it can be seen that ArcGIS cannot eliminate the three-dimensional information carried when ...
View more

Method used

Step 1.3: because original data vector data is converted into the shp file of polygon from cad, there is three-dimensional information, need to use the ST_Force2D function in PostGIS to clear its three-dimensional information, and use ST_MakeValid on this basis to carry out effective to vector data Consistency ch...
View more


The invention provides a method for calculating land homogeneity based on an open source space database PostGIS, and the method comprises the steps: importing a current land into the PostGIS database,and carrying out the two-dimensional processing and effective inspection of the transferred current land; creating a square grid by using the convex polygon externally connected with the land parcel;performing spatial superposition on the grid element layer and the current land to generate a superposed polygon; wherein the superposed polygon has the identification code and area of the grid polygon and the land property of the land parcel; calculating land types with dominant areas in each grid to obtain dominant land types in each grid; and calculating the homogeneity value of each grid to obtain the homogeneity of each grid unit. Compared with the traditional method for calculating the homogeneity of the land parcel based on the combination of a plurality of pieces of software, the calculation process is based on a PostgreSQL and a space expansion module PostGIS single platform thereof, the data calling time between different pieces of software is reduced, the operation efficiency is greatly improved, the operation speed is improved by more than 10 times compared with the conventional operation speed, and the homogeneity of the urban land can be quantitatively calculated efficiently and quickly.

Application Domain

Data processing applicationsVectoral format still image data +2

Technology Topic

Urban landData call +14


  • Method for calculating land homogeneity based on open source spatial database PostGIS
  • Method for calculating land homogeneity based on open source spatial database PostGIS
  • Method for calculating land homogeneity based on open source spatial database PostGIS


  • Experimental program(1)

Example Embodiment

[0080] The present invention will be further described below in conjunction with the accompanying drawings.
[0081] As shown in the figure, the technical scheme of the present invention will be described in detail below in conjunction with a certain plot and accompanying drawings.
[0082] like figure 1 As shown, the calculation method of land use homogeneity based on the open source spatial database PostGIS, the specific method is as follows:
[0083] Step 1: Construct the polygonal vector feature layer of current urban current land use
[0084] Step 1.1: Transfer the shp file of the current urban land use to the PostgreSQL database; transfer the shp file of the current land use plots with different types of land use to the PostGIS spatial database by the tool shp2pgsql-gui, and become a table e01_landuse in the spatial database.
[0085] Step 1.2: Use SQL to query the number of plots transferred to the current land use is 917 plots;
[0086] Step 1.3: Since the original data vector data is a shp file converted from cad to a polygon, and there is three-dimensional information, it is necessary to use the ST_Force2D function in PostGIS to clear its three-dimensional information, and on this basis, use ST_MakeValid to check the validity of the vector data, Eliminates spatial self-intersections of polygons.
[0087] Step 1.4: Use the ST_Union function to group the adjacent similar land uses into a table e02_union. The number of plots is reduced from the original 917 plots to 681 plots, which improves the efficiency of the next step of spatial superposition .
[0088] Step 1.5: Use the ST_Union function to merge the entire plot element layer, and apply the ST_ConvexHull function to generate the circumscribed convex polygon table e03_region of this plot layer.
[0089] Step 2: According to the characteristics of the city in the case, a square grid with a scale of 500m is used in this case to create a grid polygon element layer: take the generated circumscribed convex polygon e03_region as the object, and use the ST_SquareGrid function to create a 500×500 square grid polygon element layer; The generated grid polygon exceeds the boundary of the plot data layer, and the circumscribed convex polygon data layer and the 500×500 square grid polygon element layer are used for spatial superposition, and the square grid polygon within the range of the convex polygon (500×500 The number of square grid polygons is reduced from 132 to 125 grids); the area of ​​each square grid polygon is calculated, and the number of each grid polygon element is generated as the unique identification code of each square grid polygon to obtain the research scope The inner 500×500 grid polygon element layer e04_grid has two attribute words of unique identification code and area. like figure 2 As shown in the calculation process, the PostgreSQL CTE expression (recursion) is used to realize the above functions.
[0090] Step 3: Obtain grid polygons and current land use attributes. The specific process is as follows:
[0091] Step 3.1: Superimpose the 500×500 grid polygon element layer and the current land use plot layer, merge the polygons of the same grid and the same land use attribute in the superimposed polygon element layer, and calculate the area of ​​each polygon after the superposition and merger ;
[0092] Step 3.2: Calculate the percentage of each type of land use in each grid, delete the empty elements, and reduce the 85125 polygons generated during the original overlay to 480 polygon element layers e05_overlayers;
[0093] Step 3.3: The superimposed polygon attribute has two superimposed polygon attributes, and the identification code, area, current land use nature of the current land use, the superimposed polygon area, and the location of each type of land use in the square grid are obtained. Percentage property.
[0094] Step 4: Calculate the land use type with dominant area in each square grid, the specific process is as follows:
[0095] Step 4.1: Calculate the land use type with the largest area in each square grid, and obtain the land use attribute corresponding to the largest area plot in each grid and its corresponding grid identification code;
[0096]Step 4.2: Associate the grid identification code with the square grid polygon to obtain the dominant land type in each 500×500 square grid, and draw a thematic map in QGIS, such as image 3 , to obtain the land use type with dominant area in each grid.
[0097] Step 5: Calculate the homogeneity value of each square grid, the specific process is as follows:
[0098] Step 5.1: Convert the polygonal element layer generated after superimposition to each square grid identification code, and convert the percentages of various types of land into columns to generate a data table.
[0099] Step 5.2: Add a field for calculating entropy to the element table generated in step 5.1, apply the entropy formula to calculate, update the attribute value, associate the calculated entropy value with the square grid unit according to the grid identification code, and perform the grid in QGIS Thematic mapping of element homogeneity values, such as Figure 4 , and finally obtain the homogeneity value of each square grid.


no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

Systems and methods for notifying multiple hosts from an industrial controller

ActiveUS8150959B1reusable block of code very difficultimprove efficiency

MIMO-OFDM transmitter

InactiveUS20070253504A1improve efficiencyreduce time

Systems and methods for providing treatment planning

InactiveUS20050182654A1high quality of careimprove efficiency

Classification and recommendation of technical efficacy words

  • Computationally efficient
  • Improve efficiency

Dynamic range control and equalization of digital audio using warped processing

ActiveUS20050249272A1reduce processing loadcomputationally efficient

Calculating noise from multiple digital images having a common noise source

ActiveUS6934421B2enhance appearancecomputationally efficient

Inverse kinematics

ActiveUS20100228396A1computationally efficient

Method and system for verifying facial data

InactiveCN106663184AComputationally efficientavoid computing costs

Intake passage air flow real-time calculation system

InactiveCN109459098Areliable acquisitionComputationally efficient
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products