CN107577731B - Method and system for accessing different spatial databases - Google Patents

Method and system for accessing different spatial databases Download PDF

Info

Publication number
CN107577731B
CN107577731B CN201710732483.8A CN201710732483A CN107577731B CN 107577731 B CN107577731 B CN 107577731B CN 201710732483 A CN201710732483 A CN 201710732483A CN 107577731 B CN107577731 B CN 107577731B
Authority
CN
China
Prior art keywords
spatial
service
parameters
coordinate system
spatial database
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.)
Active
Application number
CN201710732483.8A
Other languages
Chinese (zh)
Other versions
CN107577731A (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.)
Duolun Technology Co Ltd
Original Assignee
Duolun Technology Co Ltd
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 Duolun Technology Co Ltd filed Critical Duolun Technology Co Ltd
Priority to CN201710732483.8A priority Critical patent/CN107577731B/en
Publication of CN107577731A publication Critical patent/CN107577731A/en
Application granted granted Critical
Publication of CN107577731B publication Critical patent/CN107577731B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a system for accessing different spatial databases, which comprises the following steps: acquiring parameters of different spatial databases; establishing a corresponding configuration file according to the type of the spatial database so as to store the acquired parameters of the spatial database; receiving parameters transmitted by a business system needing to call vector data service; extracting relevant parameters in corresponding configuration files and calling grammars and space functions of corresponding space databases to query result information according to parameter information transmitted by a service system; and converting the result information into standard format data and outputting the standard format data to a service system. The invention solves the problems that the interfaces for each spatial database are different in the prior art, and other developers need to adapt to different spatial databases before use.

Description

Method and system for accessing different spatial databases
Technical Field
The invention relates to a method and a system for accessing different spatial databases, belonging to the technical field of geographic information systems.
Background
The Geographic Information System (GIS) is a computer-based tool that maps and analyzes what is present on the earth and events that occur. GIS technology integrates this unique visualization and geographic analysis function of maps with general database operations (e.g., queries and statistical analysis, etc.). This ability distinguishes GIS from other information systems, making it of practical value in interpreting events, predicting results, planning strategies, etc. in a wide variety of public and personal enterprises and institutions.
With the development of geographic information technology, Geographic Information Systems (GIS) play a greater and greater role, and thus, a variety of spatial databases based on GIS are available, and at present, many GIS manufacturers have spatial databases, such as ESRI companies, hypergraph companies, oracle companies, bosyang world companies, and the like, and all have applications providing corresponding interfaces (APIs for short).
Because the interfaces provided by the spatial databases in the current market are different, when other developers develop other business systems based on the spatial databases, the other developers need to develop the different spatial database interfaces separately, which not only increases the development cost, but also increases the later maintenance and use cost.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides a method and a system for accessing different spatial databases, so as to solve the problems that the interfaces for the spatial databases are different in the prior art, and other developers need to adapt to the different spatial databases before use.
In order to achieve the purpose, firstly, acquiring ip address, port number, instance name, user name and password of a spatial database or parameter information such as storage path, service address and the like of the spatial database, and establishing and storing the parameter information into a corresponding configuration file; receiving parameters transmitted by a service system through an application layer; the service layer calls the grammar and space function of the corresponding space database to inquire result information through the related parameters in the corresponding configuration file, and converts the result information into standard format data to output to the service system, thereby realizing the access and unified output of different space data services.
The specific technical scheme is as follows:
referring to fig. 1, the present invention discloses a method for accessing different spatial databases, which comprises the following steps:
step M1: acquiring parameters of different spatial databases;
step M2: establishing a corresponding configuration file according to the type of the spatial database so as to store the acquired parameters of the spatial database;
step M3: receiving parameters transmitted by a business system needing to call vector data service;
step M4: extracting relevant parameters in corresponding configuration files and calling grammars and space functions of corresponding space databases to query result information according to parameter information transmitted by a service system;
step M5: and converting the result information into standard format data and outputting the standard format data to a service system.
Wherein step M5 includes:
step M51: converting the main key number in the inquired result information into OBJECTID, and converting the space field into SHAPE;
step M52: obtaining paging information of the starting record number, the ending record number and the result total number of the spatial database layer according to parameters transmitted by a service system, and inquiring field information of the spatial database layer;
step M53: and traversing the result information obtained in the steps in a for-loop mode, converting the result information into standard format data and outputting the standard format data.
As a preferable scheme, the method further comprises the following steps between the step M52 and the step M53: judging whether the projection coordinate system or the geographic coordinate system transmitted by the business system is the same as the parameters in the configuration file by adopting a character string comparison mode, if so, directly entering a step M53, and if not, calling a coordinate system transformation tool ProjectionTransform to convert the projection coordinate system or the geographic coordinate system and then entering a step M53.
Referring to fig. 2, the present invention also discloses a system for accessing different spatial databases, including: a data layer, an application layer and a service layer; wherein the content of the first and second substances,
the data layer acquires parameters of different spatial databases, establishes corresponding configuration files according to the types of the spatial databases to store the acquired parameters of the spatial databases and provides the parameters to the service layer;
the application layer receives parameters transmitted by a service system needing to call the vector data service and transmits the parameters to the service layer;
and the service layer receives the parameter information transmitted by the application layer, extracts related parameters in corresponding configuration files according to the parameter information, calls grammars and space functions of corresponding space databases to query result information, converts the result information into standard format data and outputs the standard format data to the service system.
Wherein, the step of converting the result information into the data with the standard format by the service layer specifically comprises the following steps:
step S1: converting the main key number in the result information returned by the spatial database into OBJECTID, and converting the spatial field into SHAPE; the result information returned by the spatial database specifically refers to the result information queried by the grammar and the function of the calling spatial database;
step S2: obtaining paging information of the starting record number, the ending record number and the result total number of the spatial database layer according to the transmitted parameters of the service system, and inquiring field information of the spatial database layer;
step S3: and traversing the steps in a for-loop manner to obtain result information, converting the result information into standard format data and outputting the standard format data.
As a preferable scheme, between the step S2 and the step S3, the method further comprises: judging whether the projection coordinate system or the geographic coordinate system transmitted by the business system is the same as the parameters in the configuration file by adopting a character string comparison mode, if so, directly entering step S3, and if not, calling a coordinate system transformation tool ProjectionTransform to convert the projection coordinate system or the geographic coordinate system and then entering step S3.
The present invention also discloses a computer readable storage medium having stored thereon a service program for accessing different spatial databases, the program, when executed by a processor, implementing the steps of:
step L1: acquiring parameters of different spatial databases;
step L2: establishing a corresponding configuration file according to the type of the spatial database so as to store the acquired parameters of the spatial database;
step L3: receiving parameters transmitted by a business system needing to call vector data service;
step L4: extracting relevant parameters in corresponding configuration files and calling grammars and space functions of corresponding space databases to query result information according to parameter information transmitted by a service system;
step L5: and converting the result information into standard format data and outputting the standard format data to a service system.
Wherein step L5 includes:
step L51: converting the main key number in the inquired result information into OBJECTID, and converting the space field into SHAPE;
step L52: obtaining paging information of the starting record number, the ending record number and the result total number of the spatial database layer according to parameters transmitted by a service system, and inquiring field information of the spatial database layer;
step L53: and traversing the result information obtained in the steps in a for-loop mode, converting the result information into standard format data and outputting the standard format data.
As a preferable scheme, the method further comprises the following steps between the step L52 and the step L53: judging whether the projection coordinate system or the geographic coordinate system transmitted by the business system is the same as the parameters in the configuration file by adopting a character string comparison mode, if so, directly entering a step L53, and if not, calling a coordinate system transformation tool ProjectionTransform to convert the projection coordinate system or the geographic coordinate system and then entering a step L53.
It should be noted that, in the above method or system disclosed in the present invention:
the spatial database is as follows: data access update services of PostGIS, spatiale, OracleSpatial, SDX +, ArcSDE, BeyondDB, WFS services, or PGIS.
The parameters transmitted by the service system mainly comprise: database type, query type, layer name, query field, filter condition, spatial range, paging condition, data return type, geographic coordinate system/projection coordinate system, etc.
When systems with different spatial databases are accessed, the acquired parameters of the spatial databases are different. When the spatial database is PostGIS, OracleSpatial, SDX +, ArcSDE, or beyondb, the parameters of the spatial database include: IP address, port number, instance name, user name and password, geographical coordinate system/projection coordinate system of spatial database; when the spatial database is a data access update service of Spatiallite, WFS service or PGIS, the parameters of the spatial database include: the storage path/service address of the spatial database, and the geographic coordinate system/projection coordinate system of the spatial database.
Referring to fig. 3, the vector data service provided by the system for accessing different spatial databases of the present invention includes: spatial queries, perimeter queries, attribute queries, element management, spatial computation, configuration management, and other queries.
Wherein the element management comprises adding elements, editing elements and deleting elements; the space calculation comprises the steps of calculating a geometric object intersection point, judging whether two geometric objects are disjointed or not, judging whether the two geometric objects are crossed or not, judging whether one geometric object is in the other geometric object or not, and obtaining an object with the shortest distance from a target to a query result; configuration management comprises permission configuration, spatial data parameter configuration, coordinate system configuration and log output configuration; other queries include layer range, face element center coordinates, custom SQL, layer list, and layer field list.
The invention has the following beneficial effects:
1. developers do not need to care about the type of spatial data, only need to carry out secondary development and use based on the interface provided by the invention, do not need to independently develop aiming at different spatial database interfaces, are simple and convenient to use and maintain, and can access subsequent newly-appeared spatial databases by the method of the invention, so that the expansion performance and the compatibility are high; meanwhile, the development workload, the development cost and the maintenance cost of the service system are reduced.
2. The invention manages all the parameters in a unified configuration file, and has the advantages of simple use, convenient configuration and easy management.
3. The invention is developed based on the discoter Law (Law of meter), and the development personnel have simple hands and lower learning cost.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Fig. 2 is a schematic block diagram of the system architecture of the present invention.
Figure 3 is a schematic block diagram of a vector data service.
Detailed Description
The present invention will be further described with reference to specific examples for facilitating understanding of those skilled in the art, and the description of the embodiments is not intended to limit the present invention.
Example 1: a method for accessing a PostGIS spatial database and performing spatial query is provided, and the specific flow is as follows:
11) understanding the grammar and the spatial function of the PostGIS spatial database; the map layer main key number stored in the PostGIS spatial database is gid, and the spatial field is geo;
12) acquiring an IP address, a port number, an instance name, a user name and a password of a PostGIS spatial database and storing the IP address, the port number, the instance name, the user name and the password into a configuration file corresponding to the PostGIS spatial database established in a data layer;
13) acquiring a geographic coordinate system or a projection coordinate system of spatial data of a PostGIS spatial database, and storing the geographic coordinate system or the projection coordinate system into a configuration file corresponding to the PostGIS spatial database established in a data layer;
14) reading a configuration file corresponding to parameters of the PostGIS spatial database according to the type of the spatial database, and connecting the PostGIS spatial database;
15) when a business system calls a vector data service, parameters such as a database type, a query type, a layer name, a query field, a filtering condition, a spatial range, a paging condition, a data return type, a geographic coordinate system/a projection coordinate system and the like are transmitted;
16) calling syntax and spatial functions of a corresponding PostGIS spatial database, and inquiring result information;
17) converting the result information of the step 16) into standard format data and outputting; the concrete expression is as follows:
a. replacing a main key number gid and a space field geo in result information returned by the postGIS of the space database with a main key number OBJECTID and a space field SHAPE;
b. calling setStartIndex to obtain the number of starting records of the layer, calling setMaxFeatures to obtain the number of ending records of the layer, and calling getCount (query.ALL) to obtain page information such as the total result data of the layer;
c. setting a setPropertyNames method to acquire field information of the query of the layer;
d. calling a coordinate system transformation tool class ProjectionTransform to carry out transformation of a coordinate system (supporting WGS84, Beijing 54, Xian 80, CGS2000, mercator, Lambert and Gauss-Krigger);
e. traversing the result information obtained in the steps a-d in a for-loop mode, converting the result information into standard format data and outputting the standard format data;
the output format is as follows:
<?xml version="1.0"?>
<morefeatures>
< feets beginRecord ═ as the value of incoming beginRecord "allCount ═" total number of queried records, "featureCount ═" number of records returned (basically as the value of incoming featureLimit) "layerName ═" as the incoming layer name "labelFieldName ═" displays the label field (as the incoming dispName value) "fields" if the value of incoming coliList is all, all fields are returned; otherwise return the incoming value and SHAPE ">)
< feature field name ═ field content "… … SHAPE ═ space coordinates of WKT Standard" >
</feature>
……
</features>
</morefeatures>。
Example 2: a method for accessing a SpatiaLite spatial database and performing peripheral query is provided, and the specific flow is as follows:
21) understanding the syntax and spatial functions of a SpatiaLite spatial database; the number of the layer main key stored in the Spatialite spatial database is pk _ uid, and the spatial field is geometry;
22) acquiring a storage path of a SpatiaLate spatial database and storing the storage path into a configuration file;
23) acquiring a geographic coordinate system or a projection coordinate system of spatial data of a SpatiaLate spatial database, and storing the geographic coordinate system or the projection coordinate system in a configuration file;
24) reading a configuration file corresponding to a spatalate spatial database parameter according to the type of the spatial database, and connecting the spatalate spatial database;
25) when a business system calls a vector data service, parameters such as a database type, a query type, a layer name, a query field, a filtering condition, a spatial range, a peripheral distance, a paging condition, a data return type, a geographic coordinate system/a projection coordinate system and the like are transmitted;
26) calling grammar and space functions of a corresponding SpatiaLate spatial database, and inquiring result information;
27) converting the result information of the step 26) into standard format data and outputting; the concrete expression is as follows:
a. replacing a primary key number pk _ uid and a space field geometry in result information returned by the SpatiaLate in the space database with a primary key number OBJECTID and a space field SHAPE;
b. calling setStartIndex to obtain the number of starting records, setMaxFeatures to obtain the number of ending records, and getCount (query. ALL) to obtain the paging information such as the total data of the result;
c. setting a setPropertyNames method to acquire field information of query;
d. calling a coordinate system conversion tool class to convert the coordinate system (supporting WGS84, Beijing 54, Xian 80, CGS2000, mercator, Lambert and Gauss Luger);
e. b, circularly traversing the result information returned in the steps a-d through for, converting the result information into standard format data and outputting the standard format data;
the output format is as follows:
<?xml version="1.0"?>
<morefeatures>
< feets beginRecord ═ as the value of incoming beginRecord "allCount ═" total number of queried records, "featureCount ═" number of records returned (basically as the value of incoming featureLimit) "layerName ═" as the incoming layer name "labelFieldName ═" displays the label field (as the incoming dispName value) "fields" if the value of incoming coliList is all, all fields are returned; otherwise return the incoming value and SHAPE ">)
< feature field name ═ field content "… … SHAPE ═ space coordinates of WKT Standard" >
</feature>
……
</features>
</morefeatures>。
Example 3: a method for accessing WFS service and performing attribute query is provided, which comprises the following specific processes:
31) knowing the WFS service definition specification; the specific definition is that WFS refers to a Web element service, the Web element service (WFS) returns element-level GML coding, provides transaction operations such as addition, modification, deletion and the like of elements, and is further deep for the Web map service; the OGC Web element service allows clients to retrieve geospatial data encoded using the geomarkup language (GML) from multiple Web element services, this far east defines five operations: GetCapabilities returns a Web element service capability description document (described in XML); DescripteFeatureType returns an XML document describing any element structure that can provide a service; GetFeatur provides service for a request to obtain an element instance; transaction provides service for Transaction request; lockfeature processes requests to lock one or more element type instances during a transaction;
32) obtaining a service address of WFS service and storing the service address into a configuration file;
33) acquiring a geographical coordinate system or a projection coordinate system in WFS service, and storing the geographical coordinate system or the projection coordinate system in a configuration file;
34) reading a configuration file corresponding to the WFS service according to the type of the spatial database, and connecting the WFS service;
35) when a business system calls a vector data service, parameters such as a database type, a query type, a layer name, a query field, a filtering condition, a paging condition, a data return type, a geographic coordinate system/a projection coordinate system and the like are transmitted;
36) calling corresponding WFS service to inquire result information;
37) converting the result information of the step 36) into standard format data and outputting; the concrete expression is as follows:
a. replacing a primary key number fid and a space field the _ get in result information returned by the WFS service with a primary key number OBJECTID and a space field SHAPE;
b. calling wfs service setStartIndex to obtain the number of starting records, setMaxFeatures to obtain the number of ending records, and analyzing gml, wherein featureMember obtains the paging information such as total result data and the like;
c. acquiring field attribute information according to a DesscrieFeatureType parameter in a WFS service interface;
d. firstly, converting space elements in xml, such as gml: Point (Point), gml: LineString (line), gml: Polygon (surface), gml: MultiPoint (MultiPoint), gml: multiline (multiline), gml: MultiPolygon (multifaceted) into standard wkt character strings, and then calling a coordinate system conversion tool class to convert a coordinate system (supporting WGS84, Beijing 54, Xian 80, CGS2000, mercator, Lambert and Gauss Luriger);
e. traversing the result information obtained in the steps a-d in a for-loop mode, converting the result information into standard format data and outputting the standard format data;
the output format is as follows:
<?xml version="1.0"?>
<morefeatures>
< feets beginRecord ═ as the value of incoming beginRecord "allCount ═" total number of queried records, "featureCount ═" number of records returned (basically as the value of incoming featureLimit) "layerName ═" as the incoming layer name "labelFieldName ═" displays the label field (as the incoming dispName value) "fields" if the value of incoming coliList is all, all fields are returned; otherwise return the incoming value and SHAPE ">)
< feature field name ═ field content "… … SHAPE ═ space coordinates of WKT Standard" >
</feature>
……
</features>
</morefeatures>。
Example 4: a method for accessing an ArcSDE spatial database and editing elements is provided, which comprises the following specific processes:
41) understanding the syntax and spatial functions of the ArcSDE spatial database; wherein, the layer main key number stored in the ArcSDE space data is OBJECTID, and the space field is SHAPE;
42) acquiring an IP address, a port, an example, a user name and a password of an ArcSDE spatial database and storing the IP address, the port, the example, the user name and the password into a configuration file;
43) acquiring a geographic coordinate system or a projection coordinate system of spatial data of an ArcSDE spatial database, and storing the geographic coordinate system or the projection coordinate system into a configuration file;
44) reading a configuration file corresponding to the ArcSDE spatial database parameters according to the type of the spatial database, and connecting the ArcSDE spatial database;
45) when a business system calls a vector data service, parameters such as a database type, a query type, a layer name, a query field, a filtering condition, a spatial range, a paging condition, a data return type, a geographic coordinate system/a projection coordinate system and the like are transmitted;
46) calling syntax and space functions of a corresponding ArcSDE space database, and inquiring result information;
47) converting the result information of the step 46) into standard format data and outputting;
the concrete expression is as follows:
a. calling a row.getcolumns () method in the spatial database ArcSDE to acquire the returned layer field information;
b. calling a query () method in a spatial database ArcSDE to set paging information and total number records;
c. the Seshape object is converted into a standard wkt character string, and then a coordinate system conversion tool class is called to carry out the conversion of a coordinate system (supporting WGS84, Beijing 54, Xian 80, CGS2000, Mokato, Lambert and Gauss Luger);
d. traversing the result information obtained in the steps a-d in a for-loop mode, converting the result information into standard format data and outputting the standard format data;
the output format is as follows:
<?xml version="1.0"?>
<morefeatures>
< feets beginRecord ═ as the value of incoming beginRecord "allCount ═" total number of queried records, "featureCount ═" number of records returned (basically as the value of incoming featureLimit) "layerName ═" as the incoming layer name "labelFieldName ═" displays the label field (as the incoming dispName value) "fields" if the value of incoming coliList is all, all fields are returned; otherwise return the incoming value and SHAPE ">)
< feature field name ═ field content "… … SHAPE ═ space coordinates of WKT Standard" >
</feature>
……
</features>
</morefeatures>。
While embodiments of the present invention have been described above, the present invention is not limited to the specific embodiments and applications described above, which are intended to be illustrative, instructive, and not limiting. Those skilled in the art, having the benefit of this disclosure, may effect numerous modifications thereto without departing from the scope of the invention as defined by the appended claims.

Claims (8)

1. A method for accessing different spatial databases, comprising the steps of:
step M1: acquiring parameters of different spatial databases;
step M2: establishing a corresponding configuration file according to the type of the spatial database so as to store the acquired parameters of the spatial database;
step M3: receiving parameters transmitted by a business system needing to call vector data service;
step M4: extracting relevant parameters in corresponding configuration files and calling grammars and space functions of corresponding space databases to query result information according to parameter information transmitted by a service system;
step M5: converting the result information into standard format data and outputting the standard format data to a service system;
when the spatial database is PostGIS, OracleSpatial, SDX +, ArcSDE, or beyondb, the parameters of the spatial database include: IP address, port number, instance name, user name and password, geographical coordinate system/projection coordinate system of spatial database; when the spatial database is a data access update service of Spatiallite, WFS service or PGIS, the parameters of the spatial database include: a storage path/service address of the spatial database and a geographic coordinate system/projection coordinate system of the spatial database;
the vector data service includes: spatial query, peripheral query, attribute query, element management, spatial computation, configuration management, and other queries;
wherein the element management comprises adding elements, editing elements and deleting elements; the space calculation comprises the steps of calculating a geometric object intersection point, judging whether two geometric objects are disjointed or not, judging whether the two geometric objects are crossed or not, judging whether one geometric object is in the other geometric object or not, and obtaining an object with the shortest distance from a target to a query result; configuration management comprises permission configuration, spatial data parameter configuration, coordinate system configuration and log output configuration; other queries include layer range, face element center coordinates, custom SQL, layer list, and layer field list.
2. Method for accessing diverse spatial databases according to claim 1, wherein said step M5 comprises:
step M51: converting the main key number in the inquired result information into OBJECTID, and converting the space field into SHAPE;
step M52: obtaining paging information of the starting record number, the ending record number and the result total number of the spatial database layer according to parameters transmitted by a service system, and inquiring field information of the spatial database layer;
step M53: and traversing the steps in a for-loop manner to obtain result information, converting the result information into standard format data and outputting the standard format data.
3. The method for accessing disparate spatial databases of claim 2, further comprising between said step M52 and step M53: and judging whether the parameters in the projection coordinate system or the geographic coordinate system transmitted by the service system and the corresponding configuration file are the same or not by adopting a character string comparison mode, if so, directly entering a step M53, and if not, calling a coordinate system conversion tool to convert the coordinate system and then entering a step M53.
4. A system for accessing disparate spatial databases, comprising: a data layer, an application layer and a service layer; the data layer acquires parameters of different spatial databases, establishes corresponding configuration files according to the types of the spatial databases to store the acquired parameters of the spatial databases and provides the parameters to the service layer;
the application layer receives parameters transmitted by a service system needing to call the vector data service and transmits the parameters to the service layer;
the service layer receives the parameter information transmitted by the application layer, extracts relevant parameters in corresponding configuration files according to the parameter information, calls grammars and space functions of corresponding space databases to query result information, converts the result information into standard format data and outputs the standard format data to the service system;
when the spatial database is PostGIS, OracleSpatial, SDX +, ArcSDE, or beyondb, the parameters of the spatial database include: IP address, port number, instance name, user name and password, geographical coordinate system/projection coordinate system of spatial database; when the spatial database is a data access update service of Spatiallite, WFS service or PGIS, the parameters of the spatial database include: a storage path/service address of the spatial database and a geographic coordinate system/projection coordinate system of the spatial database;
the vector data service includes: spatial query, peripheral query, attribute query, element management, spatial computation, configuration management, and other queries;
wherein the element management comprises adding elements, editing elements and deleting elements; the space calculation comprises the steps of calculating a geometric object intersection point, judging whether two geometric objects are disjointed or not, judging whether the two geometric objects are crossed or not, judging whether one geometric object is in the other geometric object or not, and obtaining an object with the shortest distance from a target to a query result; configuration management comprises permission configuration, spatial data parameter configuration, coordinate system configuration and log output configuration; other queries include layer range, face element center coordinates, custom SQL, layer list, and layer field list.
5. The system for accessing diverse spatial databases of claim 4, wherein said converting the resulting information into standard format data comprises the steps of:
step S1: converting the main key number in the inquired result information into OBJECTID, and converting the space field into SHAPE;
step S2: obtaining paging information of the starting record number, the ending record number and the result total number of the spatial database layer according to parameters transmitted by a service system, and inquiring field information of the spatial database layer;
step S3: and traversing the steps in a for-loop manner to obtain result information, converting the result information into standard format data and outputting the standard format data.
6. The system for accessing diverse spatial databases of claim 5, further comprising, between said step S2 and step S3: and judging whether the projection coordinate system or the geographic coordinate system transmitted by the service system is the same as the parameters in the corresponding configuration file by adopting a character string comparison mode, if so, directly entering a step S3, and if not, calling a coordinate system conversion tool to convert the coordinate system and then entering a step S3.
7. A computer-readable storage medium on which a service program for accessing different spatial databases is stored, the program, when executed by a processor, performing the steps of:
step L1: acquiring parameters of different spatial databases;
step L2: establishing a corresponding configuration file according to the type of the spatial database so as to store the acquired parameters of the spatial database;
step L3: receiving parameters transmitted by a business system needing to call vector data service;
step L4: extracting relevant parameters in corresponding configuration files and calling grammars and space functions of corresponding space databases to query result information according to parameter information transmitted by a service system;
step L5: converting the result information into standard format data and outputting the standard format data to a service system;
when the spatial database is PostGIS, OracleSpatial, SDX +, ArcSDE, or beyondb, the parameters of the spatial database include: IP address, port number, instance name, user name and password, geographical coordinate system/projection coordinate system of spatial database; when the spatial database is a data access update service of Spatiallite, WFS service or PGIS, the parameters of the spatial database include: a storage path/service address of the spatial database and a geographic coordinate system/projection coordinate system of the spatial database;
the vector data service includes: spatial query, peripheral query, attribute query, element management, spatial computation, configuration management, and other queries;
wherein the element management comprises adding elements, editing elements and deleting elements; the space calculation comprises the steps of calculating a geometric object intersection point, judging whether two geometric objects are disjointed or not, judging whether the two geometric objects are crossed or not, judging whether one geometric object is in the other geometric object or not, and obtaining an object with the shortest distance from a target to a query result; configuration management comprises permission configuration, spatial data parameter configuration, coordinate system configuration and log output configuration; other queries include layer range, face element center coordinates, custom SQL, layer list, and layer field list.
8. The computer-readable storage medium according to claim 7, wherein said step L5 comprises:
step L51: converting the main key number in the inquired result information into OBJECTID, and converting the space field into SHAPE;
step L52: obtaining paging information of the starting record number, the ending record number and the result total number of the spatial database layer according to parameters transmitted by a service system, and inquiring field information of the spatial database layer;
step L53: and traversing the steps in a for-loop manner to obtain result information, converting the result information into standard format data and outputting the standard format data.
CN201710732483.8A 2017-08-24 2017-08-24 Method and system for accessing different spatial databases Active CN107577731B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710732483.8A CN107577731B (en) 2017-08-24 2017-08-24 Method and system for accessing different spatial databases

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710732483.8A CN107577731B (en) 2017-08-24 2017-08-24 Method and system for accessing different spatial databases

Publications (2)

Publication Number Publication Date
CN107577731A CN107577731A (en) 2018-01-12
CN107577731B true CN107577731B (en) 2020-06-16

Family

ID=61035005

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710732483.8A Active CN107577731B (en) 2017-08-24 2017-08-24 Method and system for accessing different spatial databases

Country Status (1)

Country Link
CN (1) CN107577731B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829827A (en) * 2018-06-15 2018-11-16 安徽美图信息科技有限公司 A kind of spatial analysis Map service system based on GeoTools and OGC
CN109542931A (en) * 2018-11-23 2019-03-29 四川长虹电器股份有限公司 A method of the accurate search efficiency of sql database is improved based on regular expression
CN110515612A (en) * 2019-08-22 2019-11-29 象辑知源(武汉)科技有限公司 The quick development library of backstage drawing based on Cartopy
CN115809244A (en) * 2022-11-20 2023-03-17 北京泰策科技有限公司 Massive spatial data access, processing and release method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763347A (en) * 2008-12-24 2010-06-30 中国移动通信集团河北有限公司 GIS (Geographical Information System) interface platform as well as network GIS management system and management method
CN101853305A (en) * 2010-06-11 2010-10-06 湖南大学 Method for establishing comprehensive agricultural environmental information database
CN102402526A (en) * 2010-09-13 2012-04-04 方正国际软件有限公司 Geographic information database management method and system
WO2017066679A9 (en) * 2015-10-14 2017-05-18 Tharmalingam Satkunarajah Apparatus and method for displaying multi-format data in a 3d visualization space

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763347A (en) * 2008-12-24 2010-06-30 中国移动通信集团河北有限公司 GIS (Geographical Information System) interface platform as well as network GIS management system and management method
CN101853305A (en) * 2010-06-11 2010-10-06 湖南大学 Method for establishing comprehensive agricultural environmental information database
CN102402526A (en) * 2010-09-13 2012-04-04 方正国际软件有限公司 Geographic information database management method and system
WO2017066679A9 (en) * 2015-10-14 2017-05-18 Tharmalingam Satkunarajah Apparatus and method for displaying multi-format data in a 3d visualization space

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于服务的空间数据库集成访问技术研究与实现;蒙智敏;《中国优秀硕士学位论文全文数据库 信息科技辑》;20120215(第02期);第三章第3.2.1-3.2.2.3节 *

Also Published As

Publication number Publication date
CN107577731A (en) 2018-01-12

Similar Documents

Publication Publication Date Title
CN107577731B (en) Method and system for accessing different spatial databases
CN112115198B (en) Urban remote sensing intelligent service platform
KR101925165B1 (en) Enriching database query responses using data from external data sources
CN107368588B (en) Heterogeneous resource isomorphism method and device
US8396883B2 (en) Spatial querying in a data warehouse
US8996545B2 (en) In-memory spatial database for geocoding/geoprocessing
CN106202207A (en) A kind of index based on HBase ORM and searching system
EP4343570A1 (en) Method for detecting spatial data change in territorial spatial planning, application system, and cloud platform
US9201700B2 (en) Provisioning computer resources on a network
CN104809650A (en) Dynamic adaptive accessing method of heterogeneous sensor data
CN111737364B (en) Safe multi-party data fusion and federal sharing method, device, equipment and medium
CN108268614A (en) A kind of distribution management method of forest reserves spatial data
CN115712667B (en) Graph data fusion analysis method, device and storage medium
CN109213940A (en) Method, storage medium, equipment and system that user location calculates are realized under big data
Jo et al. Constructing national geospatial big data platform: current status and future direction
CN114254491A (en) Data processing method, device, equipment and storage medium
Sboui et al. A conceptual framework to support semantic interoperability of geospatial datacubes
CN107844538B (en) Comprehensive disaster prevention and reduction planning data management system and method for mountainous villages and towns
Kai et al. Research on Spatial Database Technology Based on Arcsde
Shigesada et al. ucR based interoperable spatial information model for realizing ubiquitous spatial infrastructure
Gourlay et al. Towards a WPS platform dedicated to an urban knowledge infrastructure
Lei et al. A cloud computing application in land resources information management
KR20020054238A (en) Component System for Distributing Geographic Information System and Method of it
Xu et al. A system for post-earthquake investigation of building damage based on smart phones
Wang et al. Research on Rural Land Management Information Network Platform

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
CB02 Change of applicant information

Address after: 211112, 1555, Tian Yin Avenue, Jiangning District, Jiangsu, Nanjing

Applicant after: DUOLUN TECHNOLOGY Co.,Ltd.

Address before: 211112, 1555, Tian Yin Avenue, Jiangning District, Jiangsu, Nanjing

Applicant before: NANJING DORON TECHNOLOGY CORPORATION Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant