Spatial Information Query

发布时间 :2023-08-23 01:42:50 UTC      

At present, the query function of most mature commercial GIS software can perfectly realize the simple search of spatial entity. For example, according to the spatial position indicated by the mouse, the system can find out the spatial entity and spatial range of the location (composed of several spatial entities) as well as their attributes, and display the list of attributes of the spatial object, and can carry out related work. Statistical analysis. The query can be divided into two steps: firstly, by means of spatial index, the selected spatial entity can be quickly retrieved in the spatial database. Secondly, according to the connection of spatial data and attribute data, the attribute list of the spatial entity can be obtained.

Attribute-based feature query #

Generally speaking, the query operation based on attribute information is mainly completed in attribute database. At present, most GIS software stores attribute information in relational database, and the mature relational database provides us with a complete data index method and information query means. Almost all relational database management systems support standard structured query languages. Using SQL, we can easily realize the compound condition query of attribute information in the attribute database, screen out the identification value of the spatial entity that meets the condition, and then retrieve the spatial entity in the spatial database according to the identification value.

Queries Based on Spatial Relations and Attribute Characteristics (SQL) #

There are many spatial relationships among spatial entities (including topology, order, measurement, etc.). In the actual application process, users often hope that GIS can provide some functions that can directly calculate spatial entity relations, such as users want to query cities that meet the following conditions:

  • A is east of a certain railway;

  • B is within 30 kilometers of the railway;

  • The population of City C is more than 700,000;

  • The selected area of City D is a defined polygon.

The entire query calculation involves spatial ordinal relationships (east of the railway), spatial distance relationships (no more than 30 kilometers from the railway), spatial topological relationships (the selected cities are within the defined area), as well as attribute information queries (city population greater than 700,000).

As far as the current mature geographic information system is concerned, it is difficult to complete the above query tasks systematically. For this reason, many geographic information system experts have proposed Spatial Query Language as a solution to the problem, but it is still in the stage of theoretical development and technological exploration.

GeoSQL: A Spatial Extended SQL Query Language #

Query and retrieval are among the most frequently used functions in geographic information systems, and most questions raised by GIS users can be expressed as queries. Spatial query languages not only enable convenient access, querying, and processing of spatial data but also ensure the security and integrity control of spatial data. Compared to standard SQL, spatially extended SQL primarily introduces spatial data types and spatial operators to support queries for spatial features. Spatial features include both spatial and non-spatial attributes, with spatial attributes represented by a specific “Location” field. In addition to basic data types such as integer, real, and string, spatial data types also include point, arc, unclosed line, polygon, image, and complex spatial feature types, all of which pertain to the “Location” field. In GeoSQL, spatial operators are parameterized functions that typically take spatial features as input and return either spatial features or numerical values.

Spatial operators are mainly divided into two categories: unary spatial operators and binary spatial operators. The general form of standard SQL is typically SELECT…FROM…WHERE , which corresponds to the relational operations of projection, Cartesian product, and selection, respectively. Here, the FROM clause represents the Cartesian product of the given relations, effectively defining a single relation. Both the selection in the WHERE clause and the projection in the SELECT clause operate on this relation. Although GeoSQL is a non-procedural textual language, it can incorporate features of visual query languages to simplify and facilitate operations, such as using icons, list boxes, and other components to minimize user text input, while also preventing syntax errors caused by lapses in memory or semantic misunderstandings during input. The implementation process of GeoSQL is illustrated in Figure 7-23.

/media/sphinx_tuto/img/img_1_xvd.png

Fig. 109 The implementation process of GeoSQL #

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.