A thematic map frame finishing method and system

By developing JavaScript scripts in Adobe Illustrator, the thematic map outlines can be automatically drawn, solving the problem that existing GIS software cannot meet the detail standards of specific thematic maps. This achieves automatic generation and standardization of map outlines, improving production efficiency.

CN116383324BActive Publication Date: 2026-01-23CHINESE PEOPLES LIBERATION ARMY UNIT 61618
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310183001.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2026-01-23
Estimated Expiration
2043-03-01

AI Technical Summary

Technical Problem

Existing commercial GIS software such as ArcMap cannot meet the detailed standards required for specific thematic maps when customizing the map outlines. Further fine-tuning is required after exporting, and it cannot be done in one step.

Method used

Using Adobe Illustrator software and JavaScript developed within the Adobe Extended Script Tool Kit environment, scripts were written to automatically draw thematic map borders. This included acquiring base map information, constructing the Illustrator document coordinate system, drawing latitude and longitude grids and borders, rotating and leveling them, and generating border styles that conform to map standards.

Benefits of technology

It enables the automatic generation of thematic map outlines, which meet the standard requirements of specific thematic maps, improves production efficiency and automation level, and avoids subsequent fine-tuning steps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116383324B_ABST
    Figure CN116383324B_ABST
Patent Text Reader

Abstract

The application provides a thematic map frame finishing method and system, and belongs to the field of map making. The method is to obtain a base map range file, a rectangular base map and left and right lower corner note instructions through a windowed interactive interface, analyze the base map range file to obtain base map information, obtain geographical coordinates of four corner points of an inner frame according to the base map information, obtain document coordinates of the four corner points after coordinate conversion, draw a latitude and longitude grid, the inner frame and an outer frame, place the rectangular base map into the inner frame according to the calculated positioning points, realize the fitting of the actual base map and the inner frame, group and rotate the inner frame, the outer frame, the latitude and longitude grid and the rectangular base map together and place them flat, finally generate a map name, left and right lower corner texts and a scale, and output the thematic map after frame finishing. The application solves the defects of lack of standardization and flexibility of automatic frame finishing of commercial GIS software, realizes one-step standardization frame finishing, and improves the production efficiency and automation level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of mapmaking, specifically relating to a method and system for shaping the outline of thematic maps. Background Technology

[0002] Thematic maps, also known as special maps, are maps created on a geographic base map that highlight and elaborately represent one or more elements related to the map's theme. This results in specialized map content, diverse forms of expression, and specific uses. They generally consist of two parts: ① Thematic content, which prominently displays natural or socio-economic phenomena and their related characteristics; ② Geographical foundation, which includes general map content indicating the spatial location and geographical background of the thematic elements, primarily such as latitude and longitude grids, river systems, boundaries, and settlements. Figure 1 Generally, the map frame needs to be decorated according to requirements so that the output style conforms to the corresponding map specifications. The content usually includes: map name, inner map frame, outer map frame, latitude and longitude grid (or square grid), scale, map description and other information.

[0003] Among the many existing commercial GIS software programs, map frame decoration functions are very powerful, offering a wide variety of decoration styles. ArcGIS, as an industry leader, offers a customizable modular decoration function in its desktop application, ArcMap. However, the automatic decoration function, exemplified by ArcMap, has the following limitations: While its custom map frame decoration function can achieve customized effects, it cannot provide a one-step solution for certain thematic maps that require compliance with specific map style specifications. For example, some thematic maps require specific requirements such as intersecting lines between inner and outer map frames, the placement of latitude and longitude annotations at corner points relative to intersecting lines, or detailed standards like only minutes or seconds for non-integer degrees in latitude and longitude grid annotations. This necessitates generating the map frame decoration in ArcMap, exporting it as an EPS file, and then further fine-tuning it in other graphics software, making a one-step solution impossible. Summary of the Invention

[0004] In view of the above-mentioned defects or deficiencies in the prior art, the present invention aims to provide a method and system for thematic map frame decoration, which, based on Adobe Illustrator software, automatically draws map frames according to the standard specifications of specific thematic maps, generates frame styles that meet the requirements, and improves the effect of frame decoration.

[0005] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0006] In a first aspect, embodiments of the present invention provide a method for shaping the outline of a thematic map, comprising the following steps:

[0007] Step S1: Obtain the base map range file, the rectangular base map surrounding the actual base map for creating thematic maps, the lower left corner annotation, and the lower right corner annotation;

[0008] Step S2: Parse the base map range file, obtain the base map information, and store it in the data dictionary;

[0009] Step S3: Obtain the geographic coordinates of the four corner points of the inner map frame based on the base map information. Construct an Illustrator document coordinate system with any corner point of the inner map frame as the origin. After two coordinate transformations, obtain the document coordinates of the four corner points in the Illustrator document coordinate system.

[0010] Step S4: Based on the base map information and map standard requirements, draw the latitude and longitude grid, inner map frame, and outer map frame based on the document coordinate system;

[0011] Step S5: Calculate the positioning point of the rectangular base map in the document coordinate system, and place the rectangular base map into the inner map frame according to the positioning point, so as to achieve the actual base map and the inner map frame fitting together;

[0012] Step S6: Group the inner map frame, outer map frame, latitude and longitude grid, and the inserted rectangular base map together and rotate and flatten them;

[0013] Step S7: Generate map title, lower left and right corner text, and scale bar, and attach them to the predetermined coordinates of the group, outputting the thematic map with the map outline embellished.

[0014] In a preferred embodiment of the present invention, the Illustrator document coordinate system in step S3 adopts a rectangular coordinate system, and specifically includes:

[0015] Step S31, the geographic coordinates of the lower left corner of the inner map frame are (left longitude and lower latitude in the base map information), the geographic coordinates of the lower right corner of the inner map frame are (right longitude and lower latitude in the base map information), the geographic coordinates of the upper left corner of the inner map frame are (left longitude and upper latitude in the base map information), and the geographic coordinates of the upper right corner of the inner map frame are (right longitude and upper latitude in the base map information).

[0016] Step S32: Based on the projection method in the base map information, write a map projection algorithm to convert the geographic coordinates of the four corner points of the inner map frame into the projected coordinates of the rectangular coordinate system, and obtain the projected coordinates of the lower left corner point, the lower right corner point, the upper left corner point, and the upper right corner point of the inner map frame.

[0017] Step S33: Set the projection coordinates of any corner point of the inner outline to the origin (0, 0) of the Illustrator document coordinate system. Subtract the projection coordinates of the current corner point from the projection coordinates of the other triangular points to obtain the coordinates of the three corner points in the Illustrator document coordinate system.

[0018] In a preferred embodiment of the present invention, the current corner point in step S33 is the lower left corner point. Therefore, the coordinates of the lower left corner point in the Illustrator document coordinate system are: lower left corner of the inner frame - document coordinates (0, 0), and the other three corner points are: lower right corner of the inner frame - document coordinates, upper left corner of the inner frame - document coordinates, and upper right corner of the inner frame - document coordinates.

[0019] In a preferred embodiment of the present invention, step S4 specifically includes:

[0020] Step S41: Calculate the latitude and longitude difference according to the scale and map standard requirements. Calculate the geographic coordinates of the latitude and longitude grid points of the inner map outline from the geographic coordinates of the four corner points and the latitude and longitude difference. Then, convert the geographic coordinates of the grid points into document coordinates, then into path points of the inner map outline, set the attributes of the inner map outline, and use the graphics drawing function to generate the inner map outline.

[0021] Step S42: Set latitude and longitude annotation attributes, and use the text box function to draw the latitude and longitude annotation attributes at the corresponding positions of the corresponding path points; set latitude and longitude grid attributes, draw path points with the same longitude in the inner map frame as meridians, and draw path points with the same latitude as parallels to form a latitude and longitude grid.

[0022] Step S43: Set the outer frame attributes, expand the document coordinates of the four corner points of the inner frame according to the relative distance required by the drawing standard to obtain the four path points of the outer frame, and use the graphics drawing function to generate the outer frame.

[0023] In a preferred embodiment of the present invention, the positioning point in step S5 is any one of the four corner points; when the upper left corner of the rectangular base map is selected as the positioning point, the formula for calculating the rectangular base map positioning point rectMap.position in the document coordinate system is as follows:

[0024]

[0025] Where dis is the distance between the top left corner of the rectangular base image and the top left corner of the actual base image, H is the height of the rectangular image, H1 is the side height of the actual base image, γ is the azimuth angle from the bottom left corner of the actual base image to the top left corner, ntk_LeftTopPoint.x is the x-coordinate of the top left corner of the inner map frame, and ntk_LeftTopPoint.y is the y-coordinate of the top left corner of the inner map frame.

[0026] In a preferred embodiment of the present invention, the rotation and flattening step in step S6 is as follows:

[0027] The angle θ between the north line of the inner map outline and the horizontal line is calculated using the document coordinates of the upper left and upper right corners of the inner map outline. The formula is as follows:

[0028]

[0029] Where RightTopPointDoc.y is the ordinate of the document coordinates of the top right corner, LeftTopPointDoc.y is the ordinate of the document coordinates of the top left corner, RightTopPointDoc.x is the abscissa of the document coordinates of the top right corner, and LeftTopPointDoc.x is the abscissa of the document coordinates of the top left corner.

[0030] If θ is positive, the group will rotate clockwise with the upper left corner of the inner map frame as the reference point. If θ is negative, the group will rotate counterclockwise with the upper left corner of the inner map frame as the reference point.

[0031] After rotation, the northern line of the inner map outline is horizontal.

[0032] As a preferred embodiment of the present invention, the base map range file includes map name, geodetic datum, projection method, scale, and geographic coordinates of the four corner points.

[0033] In a preferred embodiment of the present invention, the annotation in the lower left corner includes the production unit and the data on which it is based, which is obtained manually through an interactive interface; the annotation in the lower right corner includes the coordinate system and projection method, which is obtained by reading the base map range file.

[0034] As a preferred embodiment of the present invention, the base map information in the base map range file includes: coordinate geodetic datum, projection method, scale, left longitude, right longitude, upper latitude, and lower latitude.

[0035] Secondly, embodiments of the present invention also provide a system for implementing the thematic map frame shaping method described above, characterized in that the system includes: an interactive interface, a file parsing module, a coordinate construction and transformation module, a latitude and longitude grid and map frame generation module, a base map positioning and input module, a rotation and leveling module, and an integration module; wherein,

[0036] The interactive interface is used to obtain the base map range file, the rectangular base map surrounding the actual base map for creating thematic maps, and the annotations in the lower left and lower right corners;

[0037] The file parsing module is used to parse the base map range file, obtain the base map information, and store it in the data dictionary;

[0038] The coordinate construction and transformation module is used to obtain the geographic coordinates of the four corner points of the inner map frame based on the base map information. Taking the lower left corner of the inner map frame as the origin, an Illustrator document coordinate system is constructed. After two coordinate transformations, the geographic coordinates of the four corner points of the inner map frame are obtained as the document coordinates of the four corner points in the Illustrator document coordinate system.

[0039] The latitude and longitude grid and map frame generation module is used to draw latitude and longitude grids, inner map frames and outer map frames based on the base map information and map standard requirements;

[0040] The base map positioning module is used to calculate the positioning point of the rectangular base map in the document coordinate system, and to place the rectangular base map into the inner map frame according to the positioning point, and to realize the actual base map and the inner map frame fitting together;

[0041] The rotation and flattening module is used to group the inner map outline, outer map outline, latitude and longitude grid and the inserted rectangular base map together and rotate and flatten them;

[0042] The integration module is used to generate map titles, lower left and right corner text, and scale bars, and attach them to the predetermined coordinates of the group, outputting a thematic map with a refined map outline.

[0043] The technical solutions provided in the embodiments of the present invention have the following beneficial effects:

[0044] The thematic map outline shaping method and system provided in this invention effectively solves the defects of lack of standardization and flexibility in the outline shaping function of existing commercial GIS software. It fully leverages the flexibility, convenience and aesthetic effects of Illustrator in the field of cartography, and can automatically generate outline shaping according to the thematic map style standard requirements, achieving the goal in one step. This greatly improves production efficiency and automation level, and can be loaded into the automated processing of other special maps, thus having good promotional significance.

[0045] Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This is a flowchart of the thematic map outline shaping method provided in the embodiments of the present invention;

[0048] Figure 2This is an example diagram of the interactive interface in an embodiment of the present invention;

[0049] Figure 3 This is a schematic diagram of the base map range file in an embodiment of the present invention;

[0050] Figure 4 This is a diagram showing the relative relationship between the rectangular base map and the actual base map in an embodiment of the present invention;

[0051] Figure 5 This is an example diagram of the outline finishing effect in an embodiment of the present invention. Detailed Implementation

[0052] After discovering the aforementioned problems, the inventors of this application conducted in-depth research on existing methods for thematic map frame decoration. The research revealed that Adobe Illustrator is an excellent vector graphics processing tool, widely used in the cartography industry. It is easy to operate, has powerful secondary development capabilities, and can achieve customized functions to meet individual needs, making it suitable for thematic map frame decoration. There are two main ways to perform secondary development in Illustrator. The first method is to use the AI ​​SDK in a C++ environment (usually Microsoft Visual C++), which is the primary method Adobe uses to develop native Illustrator plugins. However, this method is difficult to learn, master, and port. The second method is to use JavaScript in the Adobe Extended Script Toolkit environment included with Illustrator. This method is easy to learn, the code is easy to maintain, and the secondary development plugin modules are independent of the operating environment, making portability between different platforms simple. The map frame decoration problem of this application can be addressed through development in the Adobe Extended Script Toolkit environment. However, how to implement thematic map frame decoration according to different practical requirements within this environment remains a challenge.

[0053] It should be noted that the defects in the above-mentioned prior art solutions are all the result of the inventors' practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present invention in the following text should be the inventors' contributions to the present invention.

[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. It should be noted that, without conflict, the embodiments and features in the embodiments of the present invention can also be combined with each other.

[0055] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In the description of this invention, the terms "first," "second," "third," "fourth," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0056] After the above in-depth analysis, the embodiments of the present invention provide a method and system for thematic map frame decoration. Based on the Adobe Illustrator software Adobe ExtendScript Toolkit development environment, the script and driver are written using JavaScript language to automatically overlay the map frame and base map with one click, thereby realizing thematic map frame decoration.

[0057] like Figure 1 As shown, the thematic map outline shaping method includes the following steps:

[0058] Step S1: Obtain the base map range file, the rectangular base map surrounding the actual base map for creating thematic maps, and the annotations in the lower left and lower right corners.

[0059] In this step, the base map scope file includes the map title, geodetic datum, projection method, scale, and geographic coordinates of the four corner points, etc. Figure 3 As shown.

[0060] According to map standards, the base map for thematic maps must be projected, typically using commercial imagery software (such as Global Mapper) to perform this projection. However, projecting using commercial imagery software outputs a rectangular base map surrounding the actual base map, such as... Figure 4 As shown. Therefore, the base map typically used for creating thematic maps is a rectangular base map.

[0061] The lower left and lower right annotations are parameters used to create thematic maps. The lower left annotation includes the producing organization and the data it is based on, which is obtained manually through an interactive interface. The lower right annotation includes the coordinate system and projection method, which is obtained by reading the base map range file.

[0062] Step S2: Parse the base map range file, obtain the base map information, and store it in the data dictionary.

[0063] In this step, the base map information in the base map scope file includes: coordinate geodetic datum, projection method, scale, left longitude, right longitude, upper latitude, and lower latitude. The base map scope file is usually in .txt, .doc, or excel format, and can be directly read during parsing. Figure 3 This shows a base map range file in txt format.

[0064] Step S3: Obtain the geographic coordinates of the four corner points of the inner map frame based on the base map information. Construct an Illustrator document coordinate system with any corner point of the inner map frame as the origin. After two coordinate transformations, obtain the document coordinates of the four corner points in the Illustrator document coordinate system.

[0065] In this step, the Illustrator document coordinate system uses a Cartesian coordinate system. Specifically, it includes:

[0066] Step S31, the geographic coordinates of the lower left corner of the inner map frame are (left longitude and lower latitude in the base map information), the geographic coordinates of the lower right corner of the inner map frame are (right longitude and lower latitude in the base map information), the geographic coordinates of the upper left corner of the inner map frame are (left longitude and upper latitude in the base map information), and the geographic coordinates of the upper right corner of the inner map frame are (right longitude and upper latitude in the base map information).

[0067] Step S32: Based on the projection method in the base map information, write a map projection algorithm to convert the geographic coordinates of the four corner points of the inner map frame into the projected coordinates of the rectangular coordinate system, and obtain the projected coordinates of the lower left corner point, the lower right corner point, the upper left corner point, and the upper right corner point of the inner map frame.

[0068] Step S33: Set the projection coordinates of any corner point of the inner outline to the origin (0, 0) of the Illustrator document coordinate system. Subtract the projection coordinates of the current corner point from the projection coordinates of the other triangular points to obtain the coordinates of the three corner points in the Illustrator document coordinate system.

[0069] In this step, preferably, the current corner point is the bottom left corner. Therefore, the coordinates of the bottom left corner in the Illustrator document coordinate system are: bottom left corner of the inner frame - document coordinates (0, 0). The other three corner points are the bottom right corner of the inner frame - document coordinates, the top left corner of the inner frame - document coordinates, and the top right corner of the inner frame - document coordinates, respectively. Of course, using the bottom left corner as the origin is merely an example; in actual operation, any corner point can be used as the origin.

[0070] Step S4: Based on the base map information and map standard requirements, draw the latitude and longitude grid, inner map frame, and outer map frame based on the document coordinate system.

[0071] This step specifically includes:

[0072] Step S41: Calculate the latitude and longitude difference according to the scale and map standard requirements. Using the geographic coordinates of the four corner points and the latitude and longitude difference, calculate the geographic coordinates of the grid points for the inner map outline. Then, convert the geographic coordinates of the grid points into document coordinates, and then into path points for the inner map outline. Set the attributes of the inner map outline and use graphics drawing functions to generate the inner map outline. The attributes of the inner map outline include the line type, line width, and color. After the attributes are preset, the program automatically draws the outline based on the data.

[0073] Step S42: Set latitude and longitude annotation attributes, and use a text box function to draw the latitude and longitude annotation attributes at the corresponding positions of the corresponding path points; set latitude and longitude grid attributes, draw path points with the same longitude in the inner map frame as meridians, and draw path points with the same latitude as parallels, forming a latitude and longitude grid. The latitude and longitude grid attributes include the line shape, line width, color, etc., and the program automatically draws them according to the data after the attributes are preset.

[0074] Step S43: Set the outer frame attributes. Expand the document coordinates of the four corner points of the inner frame according to the relative distances required by the drawing standard to obtain four path points for the outer frame. Use the graphics drawing function to generate the outer frame. The outer frame attributes include the line type, line width, color, etc. After the attributes are preset, the program automatically draws according to the data.

[0075] Step S5: Calculate the positioning point of the rectangular base map in the document coordinate system, and place the rectangular base map into the inner map frame according to the positioning point, so as to realize the actual base map and the inner map frame are aligned.

[0076] In this step, the rectangular base map is inserted based on the selected positioning point. The positioning point can be any of the four corner points, preferably the upper left corner. According to cartographic standards, the north line of the inner map frame must be horizontal; therefore, the upper left corner is generally chosen as the reference point for subsequent rotation and leveling. Other corner points can also be used, but the subsequent leveling process will need to be adjusted accordingly based on their relationship with other corner points.

[0077] To ensure that the top left corner of the actual base map (baseMap_LeftTopPoint) is consistent with the top left corner of the inner map outline (ntk_LeftTopPoint), the positioning point of the rectangular base map in the document coordinate system needs to be calculated, that is, the top left corner positioning point of the rectangular base map.

[0078] like Figure 4 As shown, taking the top left corner as the positioning point as an example, where dis is the distance between the top left corner of the rectangular base image and the top left corner of the actual base image, H is the height of the rectangular image, H1 is the side height of the actual base image, γ is the azimuth angle from the bottom left corner of the actual base image to the top left corner, ntk_LeftTopPoint.x is the x-coordinate of the top left corner of the inner map outline, and ntk_LeftTopPoint.y is the y-coordinate of the top left corner of the inner map outline, the document coordinates of the top left corner positioning point rectMap.position of the rectangular base image are calculated as follows:

[0079]

[0080] Position the top left corner of the rectangular base image into the document coordinate system, and automatically align the other three corner points to complete the base image positioning.

[0081] Step S6: Group the inner map outline, outer map outline, latitude and longitude grid, and the inserted rectangular base map together and rotate and flatten them.

[0082] In this step, the inner map frame, outer map frame, latitude and longitude grid, and the inserted base map are first grouped together. After grouping, the angle θ between the north line of the inner map frame and the horizontal line is calculated using the document coordinates of the top left and top right corners of the inner map frame. Here, RightTopPointDoc.y is the ordinate of the document coordinates of the top right corner, LeftTopPointDoc.y is the ordinate of the document coordinates of the top left corner, RightTopPointDoc.x is the abscissa of the document coordinates of the top right corner, and LeftTopPointDoc.x is the abscissa of the document coordinates of the top left corner.

[0083]

[0084] If θ is positive, the group rotates clockwise around the top left corner of the inner map frame. If θ is negative, the group rotates counterclockwise around the top left corner of the inner map frame. After rotation, the north line of the inner map frame is horizontal.

[0085] Step S7: Generate map title, lower left and right corner text, and scale bar, and attach them to the predetermined coordinates of the group, outputting the thematic map with the map outline embellished.

[0086] In this step, the document coordinates of the lower left corner of the rotated outer map frame are obtained. Based on the relative distance required by the map standard, the positions of the map title, left and right explanatory text, and scale are calculated. The text attributes are set, and the text box function is used to generate the text and scale in the lower left and right corners.

[0087] At this point, automatic overlay of the map frame decoration can be achieved, with the base map and inner map frame perfectly aligned, and the generated map frame decoration conforming to the map standard requirements. No further fine-tuning is required; it's done in one step. Figure 5 This is an example of a finishing effect diagram, such as... Figure 5 As shown, the rectangular base map is placed inside the inner map frame, and the actual base map and the inner map frame are completely aligned. At this time, the actual drawing size is reduced, and it is not measurable.

[0088] Based on the same idea, the present invention also provides a thematic map frame decoration system, the system comprising: an interactive interface, a file parsing module, a coordinate construction and conversion module, a latitude and longitude grid and map frame generation module, a base map positioning and input module, a rotation and leveling module, and an integration module.

[0089] The interactive interface is used to obtain the base map range file, a rectangular base map surrounding the actual base map for creating thematic maps, lower left corner annotations, and lower right corner annotations, such as... Figure 2 As shown;

[0090] The file parsing module is used to parse the base map range file, obtain the base map information, and store it in the data dictionary;

[0091] The coordinate construction and transformation module is used to obtain the geographic coordinates of the four corner points of the inner map frame based on the base map information. Taking any corner point of the inner map frame as the origin, an Illustrator document coordinate system is constructed. After two coordinate transformations, the geographic coordinates of the four corner points of the inner map frame are obtained as the document coordinates of the four corner points in the Illustrator document coordinate system.

[0092] The latitude and longitude grid and map frame generation module is used to draw latitude and longitude grids, inner map frames and outer map frames based on the base map information and map standard requirements;

[0093] The base map positioning module is used to calculate the positioning point of the rectangular base map in the document coordinate system, and to place the rectangular base map into the inner map frame according to the positioning point, and to realize the actual base map and the inner map frame fitting together;

[0094] The rotation and flattening module is used to group the inner map outline, outer map outline, latitude and longitude grid and the inserted rectangular base map together and rotate and flatten them;

[0095] The integration module is used to generate map titles, lower left and right corner text, and scale bars, and attach them to the predetermined coordinates of the group, outputting a thematic map with a refined map outline.

[0096] In this embodiment, each module is implemented using a processor, with additional memory added as needed for storage. The processor can be, but is not limited to, a microprocessor (MPU), a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components, etc. The memory can include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.

[0097] It should also be noted that the thematic map outline shaping system and the thematic map outline shaping method described in this embodiment are corresponding. The description and limitations of the method also apply to the system, and will not be repeated here.

[0098] As can be seen from the above technical solutions, the thematic map outline shaping method and system provided by the embodiments of the present invention effectively solves the defects of the lack of standardization and flexibility in the outline shaping function of existing commercial GIS software. It gives full play to the flexibility, convenience and aesthetic effect of Illustrator in the field of cartography. It can realize the automatic generation of outline shaping according to the requirements of thematic map, which is done in one step, greatly improving the efficiency and automation level of production operations. It can also be loaded into the automated processing of other special maps, and has good promotional significance.

[0099] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed, and is not intended to limit the scope of the claimed invention, but merely to illustrate preferred embodiments of the invention. Those skilled in the art should understand that the scope of the invention is not limited to the specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

Claims

1. A method for shaping the outline of a thematic map, characterized in that, The method includes the following steps: Step S1: Obtain the base map range file, the rectangular base map surrounding the actual base map for creating thematic maps, the lower left corner annotation, and the lower right corner annotation; Step S2: Parse the base map range file, obtain the base map information, and store it in the data dictionary; Step S3: Obtain the geographic coordinates of the four corner points of the inner map frame based on the base map information. With the lower left corner of the inner map frame as the origin, construct the Illustrator document coordinate system. After two coordinate transformations, obtain the document coordinates of the four corner points in the Illustrator document coordinate system. Step S4: Based on the base map information and map standard requirements, draw the latitude and longitude grid, inner map frame, and outer map frame based on the document coordinate system; Step S5: Calculate the positioning point of the rectangular base map in the document coordinate system, and place the rectangular base map into the inner map frame according to the positioning point, so as to achieve the actual base map and the inner map frame fitting together; Step S6: Group the inner map frame, outer map frame, latitude and longitude grid, and the inserted rectangular base map together and rotate and flatten them; Step S7: Generate map title, lower left and right corner text, and scale bar, and attach them to the predetermined coordinates of the group, outputting the thematic map with the map outline embellished.

2. The thematic map outline shaping method according to claim 1, characterized in that, Step S3 describes using a Cartesian coordinate system in the Illustrator document, specifically including: Step S31, the geographic coordinates of the lower left corner of the inner map frame are (left longitude and lower latitude in the base map information), the geographic coordinates of the lower right corner of the inner map frame are (right longitude and lower latitude in the base map information), the geographic coordinates of the upper left corner of the inner map frame are (left longitude and upper latitude in the base map information), and the geographic coordinates of the upper right corner of the inner map frame are (right longitude and upper latitude in the base map information). Step S32: Based on the projection method in the base map information, write a map projection algorithm to convert the geographic coordinates of the four corner points of the inner map frame into the projected coordinates of the rectangular coordinate system, and obtain the projected coordinates of the lower left corner point, the lower right corner point, the upper left corner point, and the upper right corner point of the inner map frame. Step S33: Set the projection coordinates of the lower left corner point of the inner outline to the origin (0, 0) of the Illustrator document coordinate system. Subtract the projection coordinates of the current corner point from the projection coordinates of the other triangular points to obtain the coordinates of the three corner points in the Illustrator document coordinate system.

3. The thematic map outline shaping method according to claim 2, characterized in that, If the current corner point mentioned in step S33 is the lower left corner point, then the coordinates of the lower left corner point in the Illustrator document coordinate system are the lower left corner point of the inner frame_document coordinates (0, 0), and the other three corner points are the lower right corner point of the inner frame_document coordinates, the upper left corner point of the inner frame_document coordinates, and the upper right corner point of the inner frame_document coordinates, respectively.

4. The method for shaping the outline of a thematic map according to claim 1, characterized in that, Step S4 specifically includes: Step S41: Calculate the latitude and longitude difference according to the scale and map standard requirements. Calculate the geographic coordinates of the latitude and longitude grid points of the inner map outline from the geographic coordinates of the four corner points and the latitude and longitude difference. Then, convert the geographic coordinates of the grid points into document coordinates, then into path points of the inner map outline, set the attributes of the inner map outline, and use the graphics drawing function to generate the inner map outline. Step S42: Set latitude and longitude annotation attributes, and use the text box function to draw the latitude and longitude annotation attributes at the corresponding positions of the corresponding path points; set latitude and longitude grid attributes, draw path points with the same longitude in the inner map frame as meridians, and draw path points with the same latitude as parallels to form a latitude and longitude grid. Step S43: Set the outer frame attributes, expand the document coordinates of the four corner points of the inner frame according to the relative distance required by the drawing standard to obtain the four path points of the outer frame, and use the graphics drawing function to generate the outer frame.

5. The method for shaping the outline of a thematic map according to claim 1, characterized in that, The positioning point mentioned in step S5 can be any one of the four corner points; when the top left corner of the rectangular base map is selected as the positioning point, the formula for calculating the positioning point rectMap.position of the rectangular base map in the document coordinate system is as follows: Where dis is the distance between the top left corner of the rectangular base image and the top left corner of the actual base image, H is the height of the rectangular image, H1 is the side height of the actual base image, γ is the azimuth angle from the bottom left corner of the actual base image to the top left corner, ntk_LeftTopPoint.x is the x-coordinate of the top left corner of the inner map frame, and ntk_LeftTopPoint.y is the y-coordinate of the top left corner of the inner map frame.

6. The thematic map outline shaping method according to claim 5, characterized in that, The rotation and leveling step described in step S6 is as follows: The angle θ between the north line of the inner map outline and the horizontal line is calculated using the document coordinates of the upper left and upper right corner points of the inner map outline. The formula is as follows: Where RightTopPointDoc.y is the ordinate of the document coordinates of the top right corner, LeftTopPointDoc.y is the ordinate of the document coordinates of the top left corner, RightTopPointDoc.x is the abscissa of the document coordinates of the top right corner, and LeftTopPointDoc.x is the abscissa of the document coordinates of the top left corner. If θ is positive, the group will rotate clockwise with the upper left corner of the inner map frame as the reference point. If θ is negative, the group will rotate counterclockwise with the upper left corner of the inner map frame as the reference point. After rotation, the northern line of the inner map outline is horizontal.

7. The method for shaping the outline of a thematic map according to any one of claims 1-6, characterized in that, The base map scope file includes the map name, geodetic datum, projection method, scale, and geographic coordinates of the four corner points.

8. The method for shaping the outline of a thematic map according to any one of claims 1-6, characterized in that, The annotations in the lower left corner include the production unit and the data on which they were based, which are obtained manually through the interactive interface; the annotations in the lower right corner include the coordinate system and projection method, which are obtained by reading the base map range file.

9. The method for shaping the outline of a thematic map according to any one of claims 1-6, characterized in that, The base map information in the base map range file includes: coordinate geodetic datum, projection method, scale, left longitude, right longitude, upper latitude, and lower latitude.

10. A system for implementing the thematic map outline shaping method as described in any one of claims 1-9, characterized in that, The system includes: an interactive interface, a file parsing module, a coordinate construction and transformation module, a latitude and longitude grid and map frame generation module, a base map positioning and input module, a rotation and leveling module, and an integration module; among which... The interactive interface is used to obtain the base map range file, the rectangular base map surrounding the actual base map for creating thematic maps, and the annotations in the lower left and lower right corners; The file parsing module is used to parse the base map range file, obtain the base map information, and store it in the data dictionary; The coordinate construction and transformation module is used to obtain the geographic coordinates of the four corner points of the inner map frame based on the base map information. Taking the lower left corner of the inner map frame as the origin, an Illustrator document coordinate system is constructed. After two coordinate transformations, the geographic coordinates of the four corner points of the inner map frame are obtained as the document coordinates of the four corner points in the Illustrator document coordinate system. The latitude and longitude grid and map frame generation module is used to draw latitude and longitude grids, inner map frames and outer map frames based on the base map information and map standard requirements; The base map positioning module is used to calculate the positioning point of the rectangular base map in the document coordinate system, and to place the rectangular base map into the inner map frame according to the positioning point, and to realize the actual base map and the inner map frame fitting together; The rotation and flattening module is used to group the inner map outline, outer map outline, latitude and longitude grid and the inserted rectangular base map together and rotate and flatten them; The integration module is used to generate map titles, lower left and right corner text, and scale bars, and attach them to the predetermined coordinates of the group, outputting a thematic map with a refined map outline.

Citation Information

Patent Citations

  • Geographical target and symbol figure registering method in making of vector geographical PDF map

    CN108711356A

  • Map data processing method and device for administrative region

    CN113535879A