CN112000902B - Method, electronic device, and storage medium for mapping an area - Google Patents

Method, electronic device, and storage medium for mapping an area Download PDF

Info

Publication number
CN112000902B
CN112000902B CN202011168628.4A CN202011168628A CN112000902B CN 112000902 B CN112000902 B CN 112000902B CN 202011168628 A CN202011168628 A CN 202011168628A CN 112000902 B CN112000902 B CN 112000902B
Authority
CN
China
Prior art keywords
map
data
coordinate system
coordinates
style
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
CN202011168628.4A
Other languages
Chinese (zh)
Other versions
CN112000902A (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.)
Shanghai Maice Data Technology Co ltd
Maice Shanghai Intelligent Technology Co ltd
Original Assignee
Shanghai Maice Data Technology Co ltd
Maice Shanghai Intelligent 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 Shanghai Maice Data Technology Co ltd, Maice Shanghai Intelligent Technology Co ltd filed Critical Shanghai Maice Data Technology Co ltd
Priority to CN202011168628.4A priority Critical patent/CN112000902B/en
Publication of CN112000902A publication Critical patent/CN112000902A/en
Application granted granted Critical
Publication of CN112000902B publication Critical patent/CN112000902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Remote Sensing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Embodiments of the present disclosure relate to methods, electronic devices, and computer storage media for mapping a region, and relate to the field of information processing. According to the method, a drawing request is received from a terminal device; determining a plurality of first coordinates associated with the map region identification based on a map coordinate system associated with the map style identification; converting the plurality of first coordinates into a data coordinate system to obtain a plurality of second coordinates; acquiring first map data based on the database query initial sentence associated with the map style identification and the plurality of second coordinates, wherein the first map data is generated by converting the second map data in the area defined by the plurality of second coordinates back to a map coordinate system; and generating a drawing result of the map area as a response to the drawing request based on the first map data and the style configuration information. Therefore, the map area data converted between the map coordinate system and the data coordinate system can be acquired, and the map area can be accurately drawn.

Description

Method, electronic device, and storage medium for mapping an area
Technical Field
Embodiments of the present disclosure relate generally to the field of information processing, and more particularly, to a method, electronic device, and computer storage medium for mapping a region.
Background
With the development of map technology, more and more map applications can adopt a customized map coordinate system to present map data. However, the map data actually collected and stored in the database is often implemented using a data coordinate system different from the map coordinate system. The conventional database provides a conversion method of a standard coordinate system, but no proper solution is provided for a non-standard coordinate system at present.
Disclosure of Invention
A method, an electronic device, and a computer storage medium for map area rendering are provided, which are capable of acquiring map area data converted between a map coordinate system and a data coordinate system, enabling accurate rendering of a map area.
According to a first aspect of the present disclosure, a method for mapping an area is provided. The method comprises the following steps: receiving a drawing request aiming at a map area from a terminal device, wherein the drawing request comprises a map style identification and a map area identification; determining a plurality of first coordinates associated with the map region identification based on a map coordinate system associated with the map style identification, the plurality of first coordinates defining a map region identified by the map region identification; converting the plurality of first coordinates to a data coordinate system associated with the map style identification to obtain a plurality of second coordinates; acquiring first map data via a database based on a database query initial sentence and a plurality of second coordinates associated with the map style identification, wherein the database query initial sentence indicates that map data associated with the layer identification is acquired, the first map data is generated by converting second map data in an area defined by the plurality of second coordinates back to a map coordinate system, and the second map data is associated with the layer identification; and generating a drawing result of the map region as a response to the drawing request based on the first map data and style configuration information associated with the map style identification.
According to a second aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the method according to the first aspect.
In a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements a method according to the first aspect of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements.
FIG. 1 is a schematic diagram of an information handling environment 100 according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of a method 200 for mapping a region, according to an embodiment of the present disclosure.
Fig. 3 is a schematic diagram of a method 300 for acquiring first map data according to an embodiment of the present disclosure.
Fig. 4 is a schematic diagram of a method 400 for acquiring first map data according to an embodiment of the present disclosure.
Fig. 5 is a schematic diagram of a rectangular map area 500, according to an embodiment of the present disclosure.
FIG. 6 is a block diagram of an electronic device for implementing a method for mapping an area of a map according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The term "include" and variations thereof as used herein is meant to be inclusive in an open-ended manner, i.e., "including but not limited to". Unless specifically stated otherwise, the term "or" means "and/or". The term "based on" means "based at least in part on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first," "second," and the like may refer to different or the same object. Other explicit and implicit definitions are also possible below.
As mentioned above, conventional databases provide a conversion method for standard coordinate systems, but there is currently no suitable solution for non-standard coordinate systems. For example, there is currently no suitable solution for the conversion between wgs84 and a custom non-standard coordinate system or a custom encrypted coordinate system.
To address, at least in part, one or more of the above problems, as well as other potential problems, example embodiments of the present disclosure propose a scheme for mapping an area. In this scheme, a server receives a drawing request for a map area from a terminal device, the drawing request including a map style identification and a map area identification. The server then determines a plurality of first coordinates associated with the map region identification based on the map coordinate system associated with the map style identification, the plurality of first coordinates defining the map region identified by the map region identification. The server then converts the plurality of first coordinates to a data coordinate system associated with the map style identification to obtain a plurality of second coordinates. Then, the server acquires first map data via the database based on a database query initial statement and a plurality of second coordinates, wherein the database query initial statement is associated with the map style identification and indicates that map data associated with the layer identification is acquired, the first map data is generated by converting second map data in an area defined by the plurality of second coordinates back to a map coordinate system, and the second map data is associated with the layer identification. Finally, the server generates a drawing result of the map area as a response to the drawing request based on the first map data and style configuration information associated with the map style identification. In this way, map area data converted between the map coordinate system and the data coordinate system is acquired, enabling accurate drawing of the map area.
Hereinafter, specific examples of the present scheme will be described in more detail with reference to the accompanying drawings.
FIG. 1 shows a schematic diagram of an example of an information processing environment 100, according to an embodiment of the present disclosure. The information processing environment 100 may include a server 110, a terminal device 120, and a database 130.
The server 110 includes, for example, but is not limited to, a server computer, a multiprocessor system, a mainframe computer, a distributed computing environment including any of the above systems or devices, and the like. In some embodiments, the server 110 may have one or more processing units, including special purpose processing units such as image processing units GPU, field programmable gate arrays FPGA, and application specific integrated circuits ASIC, and general purpose processing units such as central processing units CPU.
In some embodiments, database 130 may be implemented within server 110 as part of server 110. In other embodiments, database 130 may be located external to server 110 as a separate entity. The database 130 may store map data having a first format. The database 130 includes, for example, postgis, and the first format includes, for example, but is not limited to, a geometry (geometry) format. It should be understood that this is by way of example only, and that database 130 and the first format may be of other types as well, and the scope of the present disclosure is not limited thereto.
Terminal devices 120 include, for example, but are not limited to, personal computers, desktop computers, laptop computers, personal digital assistants, smart phones, and the like. The terminal device 120 can present a map-related interface. Map information and style configuration selections may be displayed on the interface. The user may select style configuration information on the interface including, for example and without limitation, fill color, border thickness, and the like. According to the above selection by the user, the terminal device 120 may transmit a style request to the server 110. The style request may include an image layer identification, a map coordinate system, a data coordinate system, and style configuration information. The terminal device 120 may then receive the map style identification from the server 110. In addition, the user may also select a map area on the interface, such as row 6, column 5, level 2 tiles. According to the above selection by the user, the terminal device 120 can transmit a drawing request for a map area to the server 110. The rendering request may include a map style identification and a map region identification, such as line 6, column 5, level 2. Subsequently, the terminal device 120 may receive the drawing result of the map area from the server 110 and present the drawing result on the interface.
The server 110 is used for receiving a drawing request aiming at the map area from the terminal device 120, wherein the drawing request comprises a map style identification and a map area identification; determining a plurality of first coordinates associated with the map region identification based on a map coordinate system associated with the map style identification, the plurality of first coordinates defining a map region identified by the map region identification; converting the plurality of first coordinates to a data coordinate system associated with the map style identification to obtain a plurality of second coordinates; acquiring first map data via the database 130 based on a database query initial sentence and a plurality of second coordinates associated with the map style identification, the database query initial sentence indicating that map data associated with the layer identification is acquired, the first map data being generated by converting second map data in an area defined by the plurality of second coordinates back to a map coordinate system, the second map data being associated with the layer identification; and generating a drawing result of the map region as a response to the drawing request based on the first map data and style configuration information associated with the map style identification.
Fig. 2 shows a flow diagram of a method 200 for mapping a region, according to an embodiment of the present disclosure. For example, the method 200 may be performed by the server 110 as shown in FIG. 1. It should be understood that method 200 may also include additional blocks not shown and/or may omit blocks shown, as the scope of the present disclosure is not limited in this respect.
At block 202, the server 110 receives a drawing request for a map region from the terminal device 120, the drawing request including a map style identification and a map region identification.
The map area includes a rectangular map area, such as a tile. The map area identification includes a row number, column number, and level of the map area, e.g., the row number, column number, and level at which the tile is located, such as row 6, column 5, and level 2.
At block 204, the server 110 determines a plurality of first coordinates associated with the map region identification based on the map coordinate system associated with the map style identification, the plurality of first coordinates defining the map region identified by the map region identification. The map areas may include, for example, but are not limited to, rectangular map areas, triangular map areas, trapezoidal map areas, other map areas, and the like.
Referring to fig. 5, taking rectangular map area 500 as an example, the first plurality of coordinates may include diagonal coordinates of rectangular map area 500, such as the lower left corner coordinate (B-point coordinate) and the upper right corner coordinate (D-point coordinate) of a tile, the upper left corner coordinate (a-point coordinate) and the lower right corner coordinate (C-point coordinate) of a tile, the four corner coordinates (a-D four-point coordinate) of a tile, or the three corner coordinates (ABC three-point coordinate, BCD three-point coordinate, ABD three-point coordinate, or ACD three-point coordinate) of a tile. The first coordinates may also include other coordinates on the outline of the rectangular area region, such as coordinates on an edge (e.g., coordinates of a point on the AB edge). For a non-rectangular map area, the first plurality of coordinates may include a plurality of coordinates that define an outline of the non-rectangular map area. For example, for a triangular map area, the first plurality of coordinates may include three angular coordinates of the triangular map area, and for a trapezoidal map area, the first plurality of coordinates may include four angular coordinates of the trapezoidal map area.
The map coordinate system includes, for example, but is not limited to, a custom non-standard coordinate system, or a custom encrypted coordinate system. The scope of the present disclosure is not limited thereto.
At block 206, server 110 converts the plurality of first coordinates to a data coordinate system associated with the map style identification to obtain a plurality of second coordinates.
The data coordinate system includes, for example, but is not limited to, the wgs84 coordinate system. For example, the plurality of first coordinates may be converted into the plurality of second coordinates based on an offset between the data coordinate system and the map coordinate system by calculating the offset.
At block 208, the server 110 retrieves, via the database 130, first map data based on a database query initial statement associated with the map style identification and the plurality of second coordinates, the database query initial statement indicating retrieval of the map data associated with the layer identification, the first map data generated via conversion of second map data in an area defined by the plurality of second coordinates back to a map coordinate system, the second map data associated with the layer identification.
At block 210, the server 110 generates a rendering result of the map region as a response to the rendering request based on the first map data and style configuration information associated with the map style identification. For example, a picture is generated about a map area. The rendering result may then be sent to the terminal device 120.
Therefore, the coordinate of the limited map area to be drawn can be converted into the data coordinate system, the related data is acquired and then converted back into the map coordinate system for drawing, the problem of inaccurate drawing of the map area caused by the deviation of the map coordinate system and the data coordinate system can be avoided, and the drawing accuracy of the map area is improved.
Fig. 3 shows a flow diagram of a method 300 for obtaining first map data according to an embodiment of the disclosure. For example, the method 300 may be performed by the server 110 as shown in FIG. 1. It should be understood that method 300 may also include additional blocks not shown and/or may omit blocks shown, as the scope of the disclosure is not limited in this respect.
At block 302, the server 110 generates a database query final statement based on the database query initial statement and the plurality of second coordinates, the database query final statement indicating that the second map data is to be obtained. The initial statement of database query is, for example, select a, count (1) as b from c where a >1 and { } group by a, the final statement of database query can be generated by replacing the placeholder { } in the initial statement of database query with, for example, two second coordinates (xmin, ymin) and (xmax, ymax) of the tile, and the final statement of database query is, for example, select a, count (1) as b from c where a >1 and [ xmin, ymin, xmax, ymax ] group by a. It should be understood that the above-described statements are to be considered illustrative, and that the scope of the disclosure is not limited thereto.
At block 304, the server 110 obtains second map data from the database 130 based on the database query final statement, the second map data having the first format. The database 130 includes, for example, but is not limited to postgis, and the map data stored in the database has a first format including, for example, but not limited to, a geometry (geometry) format. The geometric format may include geometric elements, including, for example, but not limited to, points, lines, multilines, multifaceted surfaces, etc., having respective different data structures.
At block 306, the server 110 converts the second map data from the first format to a first wkt (well-known text) format text. Taking point (1, 1) as an example, the above conversion can be achieved by: select st _ assert (st _ setsrint (1, 1), 4326)) as wkt.
The wkt format of the geometric element may be as follows: point: POINT (00); line: LINESTRING (00, 11, 12); dough making: POLYGON ((00, 40, 44, 04, 00), (11, 21, 22, 12, 11)); multiline: mutilinestring ((00, 11, 12), (23, 32, 54)); and (3) multifaceted: MULTIPOLYGON (((00, 40, 44, 04, 00), (11, 21, 22, 12, 11)), (((-1-1, -1-2, -2-2, -2-1, -1-1))).
The second map data may include, for example, 10 points, and the first wkt formatted text may include 10 points (x y).
At block 308, the server 110 obtains a plurality of first value pairs from the first wkt formatted text. For example, a plurality of first value pairs may be obtained from a first wkt formatted text by a regular expression. Regular expressions include, for example, but are not limited to, regexp _ match ("[ 0-9e. ]").
Then, taking the first wkt formatted text comprising 10 points (x y) as an example, 10 first value pairs (x, y) can be obtained.
In some embodiments, the locations of the plurality of first value pairs in the first wkt text may be replaced with placeholders. For example, by regexp _ place (wkt, "[ 0-9e. ] +", "% s", "g").
At block 310, the server 110 converts the first plurality of value pairs to a map coordinate system to obtain a second plurality of value pairs. For example, the plurality of first value pairs may be converted into the plurality of second value pairs based on an offset between the data coordinate system and the map coordinate system by calculating the offset.
At block 312, the server 110 replaces the plurality of first numerical pairs in the first wkt formatted text with the plurality of second numerical pairs to obtain a second wkt formatted text. In some embodiments, a plurality of second numerical value pairs may replace placeholders in the first wkt text to obtain a second wkt format text.
At block 314, the server 110 converts the second wkt format text into the first format to obtain first map data. Taking POINT (1.11.1) as an example, the above conversion can be achieved by: select st _ setsrid (st _ geocfromtext ("POINT (1.11.1)"), 4326).
It should be understood that the above description only uses points as an example, and the processing procedures are similar for other geometric elements, such as lines, multiple points, planes, multiple planes, etc., and are not described again.
Therefore, the coordinate conversion of the map data can be carried out based on the text expression mode of the map data, the abnormity caused by analyzing the data structure of the map data is avoided, the simplicity and the high efficiency are realized, and the data structure integrity of the map data is ensured.
Fig. 4 shows a flowchart of a method 400 for obtaining first map data according to an embodiment of the present disclosure. For example, the method 400 may be performed by the server 110 as shown in FIG. 1. It should be understood that method 400 may also include additional blocks not shown and/or may omit blocks shown, as the scope of the disclosure is not limited in this respect.
At block 402, the server 110 generates a database query final statement based on the database query initial statement and the plurality of second coordinates, the database query final statement indicating that the second map data is to be obtained and converted back to the map coordinate system.
The initial statement of database query is, for example, select a, count (1) as b from c where a >1 and { } group by a, the final statement of database query can be generated by replacing the placeholder { } in the initial statement of database query with, for example, two second coordinates (xmin, ymin) and (xmax, ymax) of the tile, and adding the conversion instruction, count data _ to _ count map, (geometry) of the data coordinate system to the map coordinate system, and select a, count (1) as, count data _ to _ count map, (geometry) from c where a >1 and [ xmin, ymin, xmax, ymax ] group by a. It should be understood that the above-described statements are to be considered illustrative, and that the scope of the disclosure is not limited thereto.
At block 404, the server 110 sends a database query final statement to the database 130 to cause the database 130 to obtain second map data having a first format, convert the second map data from the first format to a first wkt format text, obtain a plurality of first value pairs from the first wkt format text, convert the plurality of first value pairs to a map coordinate system to obtain a plurality of second value pairs, replace the plurality of first value pairs in the first wkt format text with the plurality of second value pairs to obtain a second wkt format text, and convert the second wkt format text to the first format to obtain the first map data.
The above steps of the database 130 can be described with reference to fig. 3, and are not described herein again.
At block 406, the server 110 receives first map data from the database 130.
Therefore, the coordinate conversion of the map data can be carried out in the database based on the text expression mode of the map data, the abnormity caused by analyzing the data structure of the map data is avoided, and the data structure integrity of the map data is ensured simply and efficiently.
Alternatively or additionally, in some embodiments, server 110 may receive a style request from terminal device 110 prior to receiving a draw request from terminal device 120, the style request including an image layer identification, a map coordinate system, a data coordinate system, and style configuration information. Layer identification includes, for example, but is not limited to, Shanghai administrative areas. The style configuration information includes, for example, but is not limited to, fill color, border thickness, and the like. The map coordinate system includes, for example, but is not limited to, a custom, non-standard coordinate system, and the data coordinate system includes, for example, but is not limited to, wgs 84.
Subsequently, the server 110 may generate a database query initial statement based on the layer identification. The initial statement of database query indicates to acquire map data associated with layer identifiers, such as select a, count (1) as b from c where a >1 and { } group by a. c for example represents map data associated with layer identifications.
The server 110 may also generate map style identification in real-time. For example, the server 110 may generate the map style identification in real time through a random algorithm, or the server 110 may take a hash result of the map layer identification, the map coordinate system, the data coordinate system, and the style configuration information as the map style identification.
The server 110 then associates the map style identification with the style configuration information, the database query initial statement, the map coordinate system, and the data coordinate system. For example, an association comprising a map style identification, style configuration information, a database query initial statement, a map coordinate system, and a data coordinate system may be generated in an association table.
Finally, the server 110 may send the map style identification to the terminal device 120.
Therefore, information such as related data query, style configuration and coordinate system can be prepared based on the style request, and the information is associated with the map style identification, so that the terminal equipment can subsequently realize data acquisition and drawing of related map areas based on the map style identification, and convenience is brought to data preparation and multiplexing in advance.
Alternatively or additionally, in some embodiments, the style request further includes data screening information. The server 110 may also add data filtering conditions to the database query initial statement based on the data filtering information. For example, the data filtering information may include displaying only the purdonut new area in the shanghai administrative area, and the server 110 may add a corresponding data filtering condition, such as a where condition, to the initial statement of the database query.
Therefore, data screening can be achieved, excessive useless data are avoided being obtained, and efficiency is improved.
Alternatively or additionally, in some embodiments, the style request further includes numerical segmentation information. The server 110 may also add a numerical segmentation condition to the database query initial statement based on the numerical segmentation information. For example, the numerical segmentation information may include [1, 100), [100, 1000), [1000, infinite)). Accordingly, the server 110 may add a corresponding numerical segmentation condition, such as a condition of group by, in the initial statement of the database query.
Therefore, the effects of numerical value segmentation presentation and the like can be realized.
Alternatively or additionally, in some embodiments, the style request may be implemented using, for example, an http request, and the content in the style request, such as style configuration information, data filtering information, and the like, may use a jason template. For example, color: { "type": rgba, "values": [0, 0, 0, 0] }, condition: { "condition": "[ a ] > 1" "color": color ().
For a jason template, a corresponding xml template may be defined. For example, color: < color > < type > rgba < type/> < values >0, 0, 0< values > < color/>, condition: < condition > < condition > \ [ a \ f \ >1< condition/> < color > { color } < color/> < condition/>.
For the content in the jason format in the style request, the conversion of the xml format may be performed recursively to obtain an xml file. For example, < condition > < condition > \ [ a \ j \ 1< condition/> < color > < type > rgba < type/> < values >0, 0, 0, 0< values > < color/> < condition/>.
In addition, for the initial statement of the database query, the initial statement can be inserted into the generated xml file as a data source. For example < condition > < condition > \[ a \ f \ 1< condition/> < color > < type > rgba < type/> < values >0, 0, 0, 0< values > < color/> < condition/> < datasource > < sql > select a, count (1) as b from c where a >1 and { } group by a < sql/> < data source/>. The xml file may be associated with a map style identification. It should be understood that the foregoing is illustrative only, and that the scope of the disclosure is not limited thereto.
Therefore, the content in the style request can be converted from the jason format to the xml format, and the drawing of the map area is convenient to carry out subsequently.
Fig. 6 illustrates a schematic block diagram of an example device 600 that can be used to implement embodiments of the present disclosure. For example, the server 110 as shown in FIG. 1 may be implemented by the device 600. As shown, device 600 includes a Central Processing Unit (CPU) 601 that may perform various appropriate actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM) 602 or loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, a microphone, and the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The various processes and processes described above, such as the method 200-400, may be performed by the processing unit 601. For example, in some embodiments, the method 200-400 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into RAM 603 and executed by CPU 601, one or more of the acts of method 200 and 400 described above may be performed.
The present disclosure relates to methods, apparatuses, systems, electronic devices, computer-readable storage media and/or computer program products. The computer program product may include computer-readable program instructions for performing various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A method for mapping a region, comprising:
receiving a drawing request aiming at a map area from a terminal device, wherein the drawing request comprises a map style identification and a map area identification;
determining a plurality of first coordinates associated with the map area identification based on a map coordinate system associated with the map style identification, the plurality of first coordinates defining a map area identified by the map area identification, the map coordinate system comprising a custom non-standard coordinate system or a custom encrypted coordinate system;
converting the plurality of first coordinates to a data coordinate system associated with the map style identification to obtain a plurality of second coordinates;
obtaining first map data via a database based on a database query initial statement and the plurality of second coordinates associated with the map style identification, the database query initial statement indicating that map data associated with a layer identification is obtained, the first map data being generated by converting second map data in an area defined by the plurality of second coordinates back to the map coordinate system, the second map data being associated with the layer identification; and
generating a drawing result of the map region as a response to the drawing request based on the first map data and style configuration information associated with the map style identification.
2. The method of claim 1, wherein obtaining the first map data comprises:
generating a database query final statement based on the database query initial statement and the plurality of second coordinates, wherein the database query final statement indicates to acquire the second map data and to convert the second map data back to the map coordinate system;
sending the database query final statement to the database to cause the database to obtain the second map data in a first format, convert the second map data from the first format to a first wkt format text, obtain a plurality of first value pairs from the first wkt format text, convert the plurality of first value pairs to the map coordinate system to obtain a plurality of second value pairs, replace the plurality of first value pairs in the first wkt format text with the plurality of second value pairs to obtain a second wkt format text, and convert the second wkt format text to the first format to obtain the first map data; and
receiving the first map data from the database.
3. The method of claim 1, wherein obtaining the first map data comprises:
generating a database query final statement based on the database query initial statement and the plurality of second coordinates, wherein the database query final statement indicates that the second map data are acquired;
acquiring the second map data from the database based on the database query final statement, wherein the second map data has a first format;
converting the second map data from the first format to a first wkt-formatted text;
obtaining a plurality of first value pairs from the first wkt formatted text;
converting the plurality of first numerical value pairs to the map coordinate system to obtain a plurality of second numerical value pairs;
replacing the plurality of first numerical pairs in the first wkt formatted text with the plurality of second numerical pairs to yield a second wkt formatted text; and
converting the second wkt format text into the first format to obtain the first map data.
4. The method of claim 1, further comprising:
receiving a style request from the terminal device, wherein the style request comprises the layer identifier, the map coordinate system, the data coordinate system and style configuration information;
generating the database query initial statement based on the layer identifier;
generating the map style identification in real time;
associating the map style identification with the style configuration information, the database query initial statement, the map coordinate system, and the data coordinate system; and
and sending the map style identification to the terminal equipment.
5. The method of claim 4, the style request further comprising data filtering information, and generating the database query initial statement comprises:
and adding a data screening condition in the database query initial statement based on the data screening information.
6. The method of claim 4, the style request further comprising numerical segmentation information, and generating the database query initial statement comprises:
and adding a numerical segmentation condition in the database query initial statement based on the numerical segmentation information.
7. The method of claim 1, wherein the map area comprises a rectangular map area and the coordinates comprise diagonal coordinates of the rectangular map area.
8. The method of claim 1, wherein the map region identification comprises a row number, a column number, and a hierarchy of the map region.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202011168628.4A 2020-10-28 2020-10-28 Method, electronic device, and storage medium for mapping an area Active CN112000902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011168628.4A CN112000902B (en) 2020-10-28 2020-10-28 Method, electronic device, and storage medium for mapping an area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011168628.4A CN112000902B (en) 2020-10-28 2020-10-28 Method, electronic device, and storage medium for mapping an area

Publications (2)

Publication Number Publication Date
CN112000902A CN112000902A (en) 2020-11-27
CN112000902B true CN112000902B (en) 2021-01-15

Family

ID=73474462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011168628.4A Active CN112000902B (en) 2020-10-28 2020-10-28 Method, electronic device, and storage medium for mapping an area

Country Status (1)

Country Link
CN (1) CN112000902B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11741093B1 (en) 2021-07-21 2023-08-29 T-Mobile Usa, Inc. Intermediate communication layer to translate a request between a user of a database and the database
CN115713613A (en) * 2022-11-25 2023-02-24 阿波罗智联(北京)科技有限公司 Text identification method and device for line, electronic equipment and medium
CN117573952B (en) * 2024-01-16 2024-03-29 北京睿企信息科技有限公司 Map-based information display method, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106384371A (en) * 2016-09-20 2017-02-08 国家基础地理信息中心 Map drawing method based on vector tile
CN110956673A (en) * 2018-09-26 2020-04-03 北京高德云图科技有限公司 Map drawing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106384371A (en) * 2016-09-20 2017-02-08 国家基础地理信息中心 Map drawing method based on vector tile
CN110956673A (en) * 2018-09-26 2020-04-03 北京高德云图科技有限公司 Map drawing method and device

Also Published As

Publication number Publication date
CN112000902A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
CN112000902B (en) Method, electronic device, and storage medium for mapping an area
US10089555B2 (en) Method, apparatus, and computer program product for providing automated testing of an optical character recognition system
CN109769141A (en) A kind of video generation method, device, electronic equipment and storage medium
CN109815448B (en) Slide generation method and device
CN112560468A (en) Meteorological early warning text processing method, related device and computer program product
CN113626223A (en) Interface calling method and device
CN110764770A (en) Method and device for conversion and assignment between objects
CN113190517B (en) Data integration method and device, electronic equipment and computer readable medium
JP2022091686A (en) Data annotation method, device, electronic apparatus and storage medium
CN111240786A (en) Walkthrough method and device, electronic equipment and storage medium
CN115454956A (en) Log generation method and device, electronic equipment and storage medium
CN114239501A (en) Contract generation method, apparatus, device and medium
CN114036158A (en) Elasticissearch and MySQL combined query method and device
CN111753238A (en) Data mapping method and device and electronic equipment
CN110543243A (en) Data processing method, device, equipment and storage medium
CN113656506B (en) Electronic specification acquisition method and device and readable medium
US20220121812A1 (en) Method for processing weather alert text, apparatus and storage medium
US20230260309A1 (en) Table extraction from image-based documents
US20220004752A1 (en) Method and apparatus for digitizing paper data, electronic device and storage medium
CN114511102A (en) Data processing method, device, system and equipment for cross-feature federal learning
CN116303644A (en) Data processing method, device, electronic equipment and storage medium
CN112581247A (en) Financial report generation method and device
CN114896004A (en) Data processing method and device, electronic equipment and storage medium
CN114881063A (en) Graphical information analysis method, device, equipment, storage medium and program product
CN117951542A (en) Method and device for processing signboard data, electronic equipment and storage medium

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