ArcGIS point map symbol data sharing method considering color integrity
By building TrueType font container and ArcGIS style storage container, the outline and color information of dotted map symbols are converted into a shareable ArcGIS style library, which solves the problem of difficult sharing of complex color dotted map symbols, and achieves efficient symbol data sharing and productivity improvement.
Patent Information
- Application Number
- CN202411849406.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to effectively share dot-shaped map symbols with complex colors, resulting in high costs for production, transmission and storage of GIS data and low symbol production efficiency.
By reading the outline and color information of dotted map symbols from the symbol library, a TrueType font container is built and a TrueType font file is generated. Then an ArcGIS style storage container is built, multi-layer dot symbols and mark dot symbols are created, color information is written and attribute information is set, and finally an ArcGIS style library is exported.
The data sharing between the ArcGIS platform symbol system and the OpenMap symbol system is realized, reducing the production cost of dotted map symbols, improving production efficiency and utilization efficiency, and ensuring color integrity.
Smart Images

Figure CN120011464A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of geographic information systems and computer map making, and in particular to an ArcGIS shared point map symbol data method taking into account color integrity. Background Art
[0002] Maps are products that visualize geographic information. When map information is transmitted, map symbols are an important carrier of geographic information. With the development of GIS, there are more and more existing geographic information platforms, such as classic desktop GIS platforms such as ArcGIS and SuperMap, and Web-based map engines such as Mapbox, ArcPro, and Cesium. Their respective map symbol systems are built based on their own underlying design and data structure.
[0003] Taking ArcGIS, the current mainstream geographic information platform, as an example, the platform requires symbol design based on standard size, color, shape, style, etc. during production and cartographic expression. When the map symbol systems of different platforms represent the same map symbol object, the underlying logical design and data structure used are often different. This makes it difficult to share symbol data between the above symbol systems, greatly reducing the sharing and reusability of map symbol resources, and bringing huge data redundancy and unnecessary cost expenditures to GIS data production, transmission, storage, etc.
[0004] The commonly used point symbols in the ArcGIS platform mainly include simple point symbols and marker point symbols. These two types of point symbols have advantages in expressing and making point symbols of a single color style, but for point map symbols with complex colors, higher point symbol production costs are often required.
[0005] Therefore, for the current mainstream GIS platform ArcGIS, a new point map symbol sharing method is urgently needed to reduce the cost of point symbol production while taking into account the color integrity of the point symbols. Summary of the invention
[0006] Purpose of the invention: To solve the problem of difficulty in transferring point map symbols with complex colors into ArcGIS style library, the present invention discloses an ArcGIS sharing point map symbol data method that takes into account color integrity, so as to realize rapid sharing of map symbol resources.
[0007] The technical solution for implementing the present invention is: a method for sharing point map symbol data in ArcGIS taking into account color integrity, comprising the following steps:
[0008] Step 1: Read the point map symbol from the symbol library to obtain all the outline information of the point map symbol and its corresponding color information;
[0009] Step 2: Build a TrueType font container, write all outline information of the point map symbol into the TrueType font symbol, generate and save the TrueType font file, and perform local installation;
[0010] Step 3: Build an ArcGIS style storage container, create multi-layer point symbols and marker point symbols in the container, write corresponding color information to the marker point symbols according to the outline information in the TrueType font symbol, set the attribute information of the marker point symbol, save and export the ArcGIS style library.
[0011] Furthermore, the step 1 of reading the dot map symbol is to sequentially traverse all the contours of the dot map symbol in the symbol library, obtain the contour information, and sequentially record the color information corresponding to each contour. The contour is a collection of a plurality of points having a topological relationship, and the contour information includes the coordinates of the plurality of points. The color information refers to the color of the contour, which is represented by the values of the three primary colors of red, green, and blue.
[0012] Furthermore, the TrueType font container constructed in step 2 is based on the open source SFNTLY font library, and the outline information of the dot map symbol is sequentially written into the container, and each outline occupies a font symbol index. The font container storing the dot map symbol outline information is saved, and a font file in TTF format is exported, and the installation program of the font file is executed locally on the computer.
[0013] Furthermore, step 3 constructs an ArcGIS style storage container based on the ArcGIS COM development component, creates an empty style storage container, and creates multi-layer point symbols and marker point symbols for the point map symbols in step 1. For each point map symbol in the TrueType font, a corresponding multi-layer point map symbol is created; for each outline information in the point map symbol, a corresponding marker point symbol is created; wherein, multiple marker point symbols corresponding to the outline information of the same point map symbol are stored in the same multi-layer point symbol. The attribute information of the marker point symbol includes the index of the font object, the rotation angle, the symbol size, and the offset of the symbol. After adding all the multi-layer point map symbols to the ArcGIS style storage container, save the ArcGIS style storage container and generate an ArcGIS style library file in the Style format.
[0014] Compared with the prior art, the beneficial effect of the present invention is that the point map symbol data structure is used as a representative of the general point symbol data structure to realize data sharing between the ArcGIS platform symbol system and the OpenMap symbol system. The present invention independently stores the outline information and color information of the point map symbol, so that the ArcGIS point map symbol can be quickly associated through the font symbol index. Compared with the traditional manual creation of ArcGIS point symbols, the present invention does not require additional design and production, reduces the production cost of ArcGIS point symbols, and improves the production efficiency and utilization efficiency of ArcGIS point symbols.
[0015] The present invention can realize cross-platform sharing operation for various map symbols in the ArcGIS map style library, and can share complex multi-color point map symbols in the general point symbol library to the ArcGIS map style library while ensuring color integrity. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flow chart of a method for sharing point map symbol data of ArcGIS taking into account color integrity of the present invention;
[0017] Figure 2 It is a schematic diagram of the correspondence between the contour information and the color information in the point map symbol of the present invention;
[0018] Figure 3 It is a schematic diagram of the main process of writing contour coordinate information into TrueType characters in the present invention;
[0019] Figure 4 It is a schematic diagram of the original style of the dot-shaped map symbol in the present invention;
[0020] Figure 5 It is a schematic diagram of the specific style and attributes of the ArcGIS point symbol in the present invention. DETAILED DESCRIPTION
[0021] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0022] The present invention discloses a method for sharing ArcGIS point map symbol data with consideration of color integrity, taking OpenMap's complex multi-color point map symbols as shared objects to achieve conversion to ArcGIS point symbol style library. The flowchart of the method is as follows: Figure 1 As shown, the following steps are included:
[0023] Step 1: Read the point map symbol from the symbol library to obtain all the outline information of the point map symbol and its corresponding color information;
[0024] Step 1 refers to the point map symbol as a general map symbol data structure, which contains the necessary symbol outline information and color information of the point symbol. Different from the single-color point symbol, each outline of the complex multi-color point symbol has separate color information, which is stored and recorded separately. While traversing the point map symbol, each outline in the symbol and its corresponding color information are recorded one by one.
[0025] Figure 2 What is shown is the correspondence between the outline information and the color information in the point map symbol. For a single point map symbol, the symbol is usually composed of multiple outlines, each of which contains its own outline coordinates and color information to control the specific outline shape and color. The outline information includes the set of point coordinates that make up the outline, and the color information is composed of the three primary color attributes that make up the color, located in the RGB color space.
[0026] Step 2: Build a TrueType font container, write all the outline information of the point map symbol into the TrueType font symbol, generate and save the TrueType font file, and perform local installation.
[0027] Step 2 refers to storing the outline information and color information of the point map symbol separately after obtaining them in step 1. The outline information of the point map symbol is stored as a font file. The specific process is to build a TrueType font container based on the open source SFNTLY font library, and write the outline coordinates of the point map symbol into the container in sequence. For each point map symbol, each outline in the symbol occupies a font symbol index separately. Save the font container storing the outline information of the point map symbol, export the font file in TTF format, and execute the installation program of the font file locally. At this time, you can preview the created point map symbol font file in the font installation directory of the computer.
[0028] Figure 3The main process of writing contour coordinate information into TrueType characters is shown. In this process, the open source TrueType management library SFNTLY is used to handle the generation and saving process of TrueType font files. SFNTLY is an open source library specifically used to handle the storage, update, editing and generation of TrueType fonts. This open source library can directly handle most TrueType character operations. A new TrueType file is constructed through SFNTLY, and the contour information of all point map symbols is written to the file. While writing the contour data, the font symbol index corresponding to each contour is recorded to associate with the subsequent color information.
[0029] In this embodiment, considering the complexity of the symbol itself, a character string of length 6 is used by default to represent the current outline of the current point map symbol. For example, in the character string "036042", the first three digits "036" represent the 36th point map symbol; the last three digits "042" represent the 42nd outline of the symbol.
[0030] After the data is written, the TrueType file is saved and generated, and finally the generated TrueType font file is installed locally. At this point, the outline information of all point map symbols is created and saved in the local computer in the form of font files.
[0031] Step 3: Build an ArcGIS style storage container, create multi-layer point symbols and marker point symbols in the container, write corresponding color information to the marker point symbols according to the outline information in the TrueType font symbol, set the attribute information of the marker point symbol, save and export the ArcGIS style library.
[0032] Step 3 refers to creating an ArcGIS style storage container based on ArcGIS COM development components after generating the point map symbol font file in step 2. The creation process of this storage container is to first introduce the ArcGIS Engine module based on COM, then call the style storage interface in the module, and use the interface to create a new style storage object.
[0033] In this embodiment, most of the point map symbols are multi-layer point symbols with multiple outlines, so the COM component is called to create a new multi-layer point symbol by default for each point map symbol. The multi-layer point symbol is used to store a composite point symbol with multiple marked point symbols. The multi-layer point symbol finally completes the formation of a single point symbol by stacking multiple marked point symbols.
[0034] For each outline in a point map symbol, a new marker point symbol is created by default, and multiple marker point symbols are stored in the same multi-layer point symbol. A marker point symbol is a type of ArcGIS point symbol. This type of point symbol obtains the corresponding symbol outline information by associating the font index in the local font file.
[0035] After creating a multi-layer point symbol with multiple outlines, first write the corresponding font symbol index information to the marker point symbol, and then set the attribute information of each marker point symbol including color information to complete the one-to-one correspondence between the single outline and the single color. The font index has been recorded in step 2 to associate the current outline of the current symbol.
[0036] The attribute information of point map symbols is divided into two categories. One category is the attributes that indicate the identification of point map symbols, such as symbol name, symbol category, symbol code, etc. This type of attribute information does not affect the style of the point symbol; the other category indicates the attributes of the point map symbol size, color, rotation angle, offset, etc. This type of attribute affects the style of the point map symbol without changing the shape of the original point map symbol.
[0037] In this embodiment, the color of the stroke primitive is stored in the stroke information, and the color of the fill primitive is stored in the path color parameter; the rotation angle is usually 0 by default; the symbol size needs to be calculated based on the zoom ratio of the area where the symbol is finally displayed; the symbol offset needs to be calculated based on the translation amount of the symbol from the original position to the origin and the zoom ratio. The calculation formula for the zoom ratio is:
[0038] Proportion=max(dw,dh) / (max(w,h)
[0039] Where w and h represent the width and height of the original symbol size; dw and dh represent the width and height of the final display area.
[0040] Take the display area size of 1000px*1000px and the display center (500px, 500px) as an example. The symbol needs to be translated from the origin (0px, 0px) to the display center. At this time, the offset is (+500px, +500px). Assuming that the width and height of the original symbol are 250px and 500px respectively, the scaling ratio calculated according to the scaling ratio formula is 2, so the final size of the symbol is 500px in width and 1000px in height. After all attribute information is set, each marker point symbol will be added to the multi-layer point symbol.
[0041] Finally, the symbol is added to the ArcGIS style storage container, and the style storage container is saved and an ArcGIS style library file in the Style format is generated.
[0042] Figure 4 , Figure 5 This example shows a set of OpenMap multi-color point map symbols shared to the ArcGIS point symbol style library. Figure 4 This is the original style of the dot map symbol "Nanjing Lansheng Tower", which is a multi-color dot symbol. As shown in the figure, the symbol is composed of a large number of contours, a total of 68 contours, and different contours have different color attributes. In the ArcGIS style library, creating an identical dot symbol is a cumbersome and inefficient task. For the special contours in the symbol, such as arcs and curves, these symbols cannot be directly obtained in the ArcGIS style library. They need to rely on external drawing software for redesign and production, save as local pictures, and then import them into the ArcGIS style library. In this process, it is difficult to ensure that the dot symbols created and designed by yourself have the same size and shape.
[0043] Figure 5 It is the specific style and attribute display of ArcGIS point symbol. As shown in the figure, the point symbol is consistent with the original point map symbol in shape and style. The symbol contains multiple marker point symbol layers. Each single marker point symbol only contains a single outline of the original symbol. For a single marker point symbol, the symbol contains the independent color attribute, size, rotation angle, offset, etc. of the outline. These attributes are automatically assigned through the symbol sharing method.
[0044] If the multi-layer point symbol is created manually in the traditional way, a sub-symbol needs to be created for each contour in the ArcGIS style library, and all the symbols need to be stacked to form a complex multi-layer point symbol. In this process, the size, color, offset and other attributes of each sub-symbol need to be set separately. This process needs to be repeated 68 times to completely produce the point symbol. Compared with the manual creation of symbols and input of attributes, the method proposed in the present invention does not require additional design and production, and at the same time frees up repetitive work, thereby improving the production efficiency and utilization efficiency of point symbols.
Claims
1. A method for sharing point map symbol data in ArcGIS with consideration of color integrity, characterized in that: include: Step 1: read the point map symbol from the symbol library, traverse all the contours of the point map symbol in turn, and record the contour information and the color information of each contour; Step 2: Build a TrueType font container, write all outline information of the point map symbol into the TrueType font symbol, generate and save the TrueType font file, and perform local installation; Step 3: Build an ArcGIS style storage container, create multi-layer point symbols and marker point symbols in the storage container, write corresponding color information to the marker point symbols according to the outline information in the TrueType font symbol, set the attribute information of the marker point symbol, save and export the ArcGIS style library.
2. The sharing method according to claim 1, characterized in that: Step 1 traverses all contours of the point map symbols in sequence, and the traversal rule is to traverse in pre-order order of the objects, that is, to take out the contour objects of the point symbols in order from small to large according to the storage order.
3. The sharing method according to claim 2, characterized in that: The contour is a collection of a plurality of points having a topological relationship, and the contour information includes the coordinates of the plurality of points.
4. The sharing method according to claim 2, characterized in that: The color information refers to the color of the outline, which is represented by the values of the three primary colors: red, green, and blue.
5. The sharing method according to claim 1, characterized in that: The construction of the TrueType font container described in step 2 is based on the open source SFNTLY font library, and the outline information of the point map symbols is written into the font container in sequence, and each outline occupies a font symbol index.
6. The sharing method according to claim 5, characterized in that: The font container storing the outline information of the point map symbol is saved, a font file in TTF format is exported, and the installation program of the font file is executed locally on the computer.
7. The sharing method according to claim 1, characterized in that: Step 3 describes building an ArcGIS style storage container based on ArcGIS COM development components, creating an empty style storage container, and creating multi-layer point symbols and marker point symbols for the point map symbols in step 1.
8. The sharing method according to claim 7, characterized in that: For each point map symbol in the TrueType font, a corresponding multi-layer point map symbol is created; for each outline information in the point map symbol, a corresponding marker point symbol is created; wherein, multiple marker point symbols corresponding to the outline information of the same point map symbol are stored in the same multi-layer point symbol.
9. The sharing method according to claim 8, characterized in that: The attribute information of the marking point symbol includes the index of the font object, the rotation angle, the symbol size and the offset of the symbol.
10. The sharing method according to claim 9, characterized in that: After adding all multi-layer point map symbols to the ArcGIS style storage container, save the ArcGIS style storage container and generate an ArcGIS style library file in Style format.