A method for setting the projection coordinate system of geospatial data

By automatically analyzing and updating the projection coordinate system of segmented geospatial data, the inefficiency and consistency problems of existing technologies are solved, and efficient and automatic projection coordinate system setting is achieved.

CN117033535BActive Publication Date: 2025-09-16ZHEJIANG INST OF HYDRAULICS & ESTUARY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310998317.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2025-09-16
Estimated Expiration
2043-08-09

AI Technical Summary

Technical Problem

When processing geographic spatial data over a large area and a long time span, existing technologies have problems such as large data volume, low efficiency and easy error in manual settings, inconsistent projection coordinate systems and cumbersome modification steps.

Method used

By analyzing the composition and naming method of the geospatial data files, the data processing requirements are determined, the projection coordinate system is automatically created and updated, the plane coordinates are calculated using the Gauss projection coordinate forward calculation formula, the specific projection coordinate system is determined according to the file name, and automated processing is achieved through devices and electronic equipment.

Benefits of technology

It realizes the automatic projection setting of large-scale segmented geospatial data, improves processing efficiency, reduces manual intervention, simplifies modification steps, and ensures the consistency of the projection coordinate system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117033535B_ABST
    Figure CN117033535B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for setting a projection coordinate system for tiled geospatial data, comprising the following steps: S1: analyzing the composition and naming method of tiled geospatial data files in a specified folder, judging whether they meet data processing requirements, and determining the longitude range of a study area; S2: creating different projection coordinate system templates according to the longitude ranges, and calculating the plane coordinates of the maximum longitude and the minimum longitude of the study area under different projection coordinate systems; S3: determining the projection coordinate system for the tiled geospatial data files that meet the data processing requirements according to their respective file naming methods; S4: updating the coordinate system information of each tiled geospatial data file according to its projection coordinate system; and S5: repeating steps S3-S4 until the projection coordinate system setting for all tiled geospatial data files in the specified folder is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of surveying, mapping and geographic information science and technology, and in particular relates to a method for setting a projection coordinate system for framing geographic spatial data. Background Art

[0002] Map framing refers to the division of a map of a large area into several appropriately sized individual maps, facilitating map production and use. Common framing methods include rectangular framing and longitude / latitude framing. Small-scale maps below 1:2000 generally use longitude / latitude framing, while large-scale maps such as 1:2000, 1:1000, and 1:500 use rectangular framing. Map framing meets the needs of map surveying, production, and printing, facilitating management, distribution, and portability.

[0003] Currently, the surveying, mapping and geographic information authorities provide geospatial data in sections according to the required scope based on user applications. When the geographic spatial scope of the study area is large and the time span is long, the shared data has problems such as a large number of sections, lack of projection coordinate system, and inconsistent projection coordinates. The collected data needs to be checked and preprocessed. Existing solutions include: setting the projection coordinate system for spatial data that lacks a projection coordinate system after unified loading and display; manually classifying the spatial data of different projection bands according to the projection band and then setting the projection coordinate system; resetting the projection coordinate system for spatial data with inconsistent projection coordinate systems. The current method has the following shortcomings: (1) The data volume is large, manual setting is inefficient and prone to errors; (2) Whether there is a projection needs to be loaded and displayed before it is determined, and the confirmation and comparison of the projection method are mainly manual, which is not convenient. (3) The steps for modifying and setting the projection are cumbersome. The data is locked when it is loaded and displayed and cannot be modified. It needs to be closed and released to modify the projection setting. Summary of the Invention

[0004] In view of the problems existing in the prior art, the embodiment of the present application aims to provide a method for setting a projection coordinate system for segmented geographic spatial data.

[0005] According to a first aspect of an embodiment of the present application, a method for setting a projection coordinate system for tiled geographic spatial data is provided, comprising:

[0006] S1: Analyze the composition and naming of geospatial data files in the specified folder to determine whether they meet the data processing requirements and determine the longitude range of the study area;

[0007] S2: Create different projection coordinate system templates according to the longitude range, and calculate the plane coordinates of the maximum longitude and minimum longitude of the study area under different projection coordinate systems;

[0008] S3: For the tiled geospatial data files that meet the data processing requirements, determine the projection coordinate system according to their respective file naming methods;

[0009] S4: updating the coordinate system information of each geospatial data file according to the projection coordinate system of each tile;

[0010] S5: Repeat steps S3-S4 until the projection coordinate system settings of all the tiled geospatial data files in the designated folder are completed.

[0011] Furthermore, in step S1, it is determined whether the data processing requirements are met, including determining whether the extension is one of the formats of JPG, TIF, IMG, BMP, GRD, DWG, and SHP, and determining whether the file name conforms to a 10-digit length or a "number-number" format. If any of the above data processing requirements are not met, subsequent data processing cannot be performed.

[0012] Furthermore, in step S1, the latitude and longitude range of the study area is determined by any of the following two methods:

[0013] Manually enter the maximum longitude LMAX, maximum latitude BMAX, minimum longitude LMIN, and minimum latitude BMIN;

[0014] Enter the administrative district name and automatically calculate the maximum longitude LMAX, maximum latitude BMAX, minimum longitude LMIN, and minimum latitude BMIN based on the pre-specified administrative district index.

[0015] Furthermore, step S2 includes:

[0016] According to the 3-degree zoning, when the study area spans different zones, n different projection coordinate systems need to be established:

[0017] n=INT(LMAX / 3+0.5)-INT(LMIN / 3+0.5)+1

[0018] The central meridian Li, minimum longitude Limin, and maximum longitude Limax of the i-th projection coordinate system are calculated according to the following formula, where i = 1, 2, 3...n:

[0019] Li=(INT(LMIN / 3+0.5)+i-1)×3

[0020] Limin=Li-1.5

[0021] Limax=Li+1.5

[0022] The Gauss projection coordinate forward calculation formula is used to calculate the plane coordinates of the maximum longitude LMAX and the minimum longitude LMIN of the study area in each zone projection coordinate system.

[0023] Furthermore, step S3 specifically includes parsing the file names of the tiled geographic spatial data that meet the data processing requirements without the file extension;

[0024] If the string length of the file name is 10, convert the second and third characters into integers a, the fourth character is blc, take the last three characters of the file name and convert them into an integer recorded as b, calculate the center longitude L of the map sheet according to L = (a-31)*6+(b-0.5)*delta, and determine the specific zone projection coordinate system by comparing the center longitude L with the minimum longitude Limin and the maximum longitude Limax of different projection coordinate systems. That is, when L is greater than Limin and L is less than or equal to Limax, use the i-th projection coordinate system, where delta is determined according to blc;

[0025] If the file name format conforms to "number 1 - number 2", number 2 is compared with the minimum longitude and maximum longitude plane coordinate values ​​of different projection coordinate systems. If they are within the range, the projection coordinate system is adopted.

[0026] According to a second aspect of an embodiment of the present application, a device for setting a projection coordinate system for tiled geographic spatial data is provided, comprising:

[0027] The longitude range determination module is used to analyze the composition and naming method of the geospatial data files in the specified folder, determine whether they meet the data processing requirements, and determine the longitude range of the study area;

[0028] The plane coordinate calculation module is used to create different projection coordinate system templates according to the longitude range and calculate the plane coordinates of the maximum longitude and minimum longitude of the study area under different projection coordinate systems;

[0029] The projection coordinate system determination module is used to determine the projection coordinate system of the geospatial data files that meet the data processing requirements according to their respective file naming methods;

[0030] The coordinate system update module is used to update the coordinate system information of each geospatial data file according to the projection coordinate system of each geospatial data file; the repetition module is used to repeat steps S3-S4 until the projection coordinate system setting of all geospatial data files in the specified folder is completed.

[0031] According to a third aspect of the embodiments of the present application, there is provided an electronic device, including:

[0032] one or more processors;

[0033] a memory for storing one or more programs;

[0034] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in the first aspect.

[0035] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0036] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:

[0037] It can be seen from the above embodiments that the present application adopts a method for setting the projection coordinate system of fragmented geographic spatial data, which realizes batch inspection, modification and setting of the projection of fragmented geographic spatial data with large amounts of data and multiple formats through a small number of parameters. It overcomes the current problems of low efficiency of manual setting of fragmented geographic spatial data projection, inconvenience in confirming and comparing projections, and cumbersome steps in modifying and setting projections, and achieves the technical effect of automatically setting the projection of fragmented geographic spatial data without manual intervention.

[0038] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0040] Figure 1 The present invention is a flowchart showing a method for setting a projection coordinate system for tiled geographic spatial data according to an exemplary embodiment.

[0041] Figure 2 The figure is a schematic diagram showing a range of 10-character length of a file name according to an exemplary embodiment.

[0042] Figure 3 The figure is a schematic diagram showing a band range in which a file name format is "number 1 - number 2" according to an exemplary embodiment.

[0043] Figure 4 The present invention is a block diagram of a device for setting a projection coordinate system for tiled geographic spatial data according to an exemplary embodiment.

[0044] Figure 5 is a schematic diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0045] Exemplary embodiments are described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different drawings represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with this application.

[0046] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0047] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0048] Figure 1 FIG. 1 is a flow chart showing a method for setting a projection coordinate system for geospatial data according to an exemplary embodiment. Figure 1 As shown, the method is applied in a terminal and may include the following steps:

[0049] S1: Analyze the composition and naming of the geospatial data files in the specified folder to determine whether they meet the data processing requirements and determine the longitude and latitude range of the study area;

[0050] S2: Create different projection coordinate system templates according to the zones and name them, and calculate the plane coordinates of the maximum longitude and minimum longitude of the study area under different projection coordinate systems;

[0051] S3: Read the name of the tiled geospatial data file, select different calculation methods based on the file naming method, and determine the projection coordinate system;

[0052] S4: Read the coordinate system information of the tiled geospatial data file, compare it with the projection coordinate system determined in step S3, and save the new coordinate system information to a prj file with the same name as the file.

[0053] S5: Repeat steps S3-S4 until the projection coordinate system of all tiled geospatial data files in the specified folder is set.

[0054] In the specific implementation of step S1, the composition and naming method of the geospatial data files in the specified folder are analyzed to determine whether they meet the data processing requirements and determine the longitude range of the study area;

[0055] Specifically, read the tiled geospatial data file and check whether the data file meets the following two requirements:

[0056] (i) Determine whether the file extension is one of the formats JPG, TIF, IMG, BMP, GRD, DWG, and SHP. If not, subsequent processing cannot be performed. Specifically, the last three letters of the file name are taken and compared with JPG, TIF, IMG, BMP, GRD, DWG, and SHP. If it does not belong to any of the above formats, subsequent processing cannot be performed.

[0057] (ii) Check whether the file name complies with a 10-digit length or "number-number" format. If not, subsequent processing cannot proceed. The number of files that meet these requirements is recorded as FCount. Specifically, take the string before the last decimal point in the file name and calculate whether the string length is 10. If not, determine whether the string contains the character '-'. If it does, split it into two parts based on the '-' character and determine whether both parts can be converted to integers. If both can be converted to integers, the requirements are met. If neither of the above two requirements is met, subsequent processing cannot proceed.

[0058] There are two ways to determine the longitude and latitude range of the study area. One is to manually enter the maximum longitude LMAX, maximum latitude BMAX, minimum longitude LMIN, and minimum latitude BMIN. The other is to enter the administrative district name and obtain the maximum longitude LMAX, maximum latitude BMAX, minimum longitude LMIN, and minimum latitude BMIN based on the pre-specified administrative district vector geometry outer rectangular box.

[0059] Figure 2 The file name is a 120° and 123° zone range diagram with a character length of 10, H51G065021.TIF, H51G065022.TIF...; Figure 3 The bit file name is "number 1-number 2" band range diagram, 3250-639.TIF, 3250-640.TIF...

[0060] In one embodiment, the longitude and latitude ranges are manually input as follows: maximum longitude LMAX=121.75°, maximum latitude BMAX=29.50°, minimum longitude LMIN=121.10°, and minimum latitude BMIN=29.12°.

[0061] In the specific implementation of step S2, different projection coordinate system templates are created according to the longitude range, and the plane coordinates of the maximum longitude and the minimum longitude of the study area under different projection coordinate systems are calculated;

[0062] Specifically, different projection coordinate system templates are created and named according to the longitude difference. The default projection coordinate system refers to the CGCS2000 National Geodetic Coordinate System and the Gauss-Krüger projection. It is divided into 3 zones, that is, the longitude difference is 3 degrees, and the longitude of the central meridian is a multiple of 3. The maximum longitude of a zone is the longitude of the central meridian plus 1.5 degrees, and the minimum longitude is the longitude of the central meridian minus 1.5 degrees. When the study area spans different zones, n different projection coordinate systems need to be established. n is calculated according to the following formula:

[0063] n=INT(LMAX / 3+0.5)-INT(LMIN / 3+0.5)+1 (1)

[0064] Among them, INT() means rounding down.

[0065] The projection coordinate system information is saved in the prj file, and the file names are named from "CGCS2000-1.prj" to "CGCS2000-n.prj". The central meridian Li, minimum longitude Limin, and maximum longitude Limax of the i-th (i=1, 2, 3...n) projection coordinate system are calculated according to the following formula:

[0066] Li=(INT(LMIN / 3+0.5)+i-1)×3 (2)

[0067] Limin=Li-1.5 (3)

[0068] Limax=Li+1.5 (4)

[0069] Calculating the plane coordinates of the maximum longitude LMAX and the minimum longitude LMIN of the study area under different projection coordinate systems means using the Gauss projection coordinate forward calculation formula to calculate the plane coordinates of the maximum longitude LMAX and the minimum longitude LMIN of the study area under each zonal projection coordinate system. If there are n projection coordinate systems, there are 2n plane coordinates after calculation. Each coordinate value is divided by 1000 and rounded down to the nearest integer, marked as Xmin-1, Xmax-1…Xmin-n, Xmax-n.

[0070] In this embodiment, the maximum longitude LMAX = 121.75 and the minimum longitude LMIN = 121.10. According to formula (1), we can obtain: n = INT(121.75 / 3+0.5)-INT(121.10 / 3+0.5)+1=2. The projection coordinate system information is saved in the prj file, and the file name is named according to "CGCS2000-1.prj" and "CGCS2000-2.prj". The central meridian Li, minimum longitude Limin, and maximum longitude Limax of the i-th (i=1, 2) projection coordinate system are calculated according to the following formula:

[0071] L1=(INT(121.10 / 3+0.5)+1-1)×3=120. L1min=120-1.5=118.5, L1max=120+1.5=121.5.

[0072] L2=(INT(121.10 / 3+0.5)+2-1)×3=123. L2min=123-1.5=121.5, L2max=123+1.5=124.5.

[0073] Calculate the plane coordinates Xmin and Xmax of the maximum longitude LMAX and minimum longitude LMIN of the study area in different projection coordinate systems: at the central meridian L1, the plane coordinates of the study area are Xmin-1 = 606 and Xmax-1 = 669; at the central meridian L2, the plane coordinates of the study area are Xmin-2 = 315 and Xmax-2 = 378.

[0074] In the specific implementation of step S3, for the tiled geospatial data files that meet the data processing requirements, the projection coordinate system is determined according to the respective file naming methods;

[0075] Specifically, it reads the name of the tiled geographic spatial data file, selects different calculation methods according to the file naming method, and determines the projection coordinate system.

[0076] Read the file that meets the data file inspection requirements and parse the file name without the file extension, that is, take the character string before the last decimal point of the file name. If the character string length is 10, read the second and third characters and convert them into integers recorded as a, the fourth character is blc, take the last three characters of the file name and convert them into an integer recorded as b, calculate the center longitude L of the map sheet according to formula 5, and determine the specific zone projection coordinate system based on the comparison of the center longitude L with Limin and Limax, that is, when L is greater than Limin and L is less than or equal to Limax, use the i-th projection coordinate system.

[0077] L = (a - 31) * 6 + (b - 0.5) * delta (5)

[0078] The delta in the formula is determined based on blc, see Table 1.

[0079] Table 1 BLC and delta correspondence

[0080]

[0081]

[0082] Read the file name without the file extension. If the file name matches the format of "number 1 - number 2", extract number 1 and number 2 as Y and X, respectively. Compare X with the minimum longitude and maximum longitude plane coordinate values ​​Xmin-1, Xmax-1...Xmin-n, Xmax-n of different projection coordinate systems in step 2). If they are within the range, use that projection coordinate system. That is, when X is greater than Xmin-i and X is less than Xmax-i, use the i-th projection coordinate system.

[0083] In this embodiment, for Figure 2 The string length shown is 10 for a file name, such as H51G065021.TIF. Read the file name excluding the file extension, H51G065021, whose string length is 10. Read the second and third characters and convert them to integers, recording a = 51. The fourth character is blc, which is G. In the formula, delta is 0.0625. Take the last three characters of the file name and convert them to an integer, recording b = 21. The central longitude of H51G065021 is L = (51-31)*6+(21-0.5)*(0.0625) = 121.28125, where L is between L1min and L1Max, i.e., L1min(118.5)<L(121.28125)<L1max(121.5). Therefore, the projection coordinate system of H51G065021 has a central meridian of L1 = 120, and the coordinate system file is CGCS2000-1.prj.

[0084] For Figure 3 The file name in the "number 1-number 2" format is shown, such as: 3250-642.TIF, then number 1 (3250) is extracted as Y1 is 3250, number 2 (642) is extracted as X is 642, and X is compared with Xmin-1, Xmax-1, Xmin-2, and Xmax-2. After comparison, X is between Xmin-1 and Xmax-1, that is, Xmin-1 (606) < X (642) < Xmax-1 (669), so the central meridian is determined to be L1, that is, 120, and the coordinate system file is CGCS2000-1.prj. If the spatial data file is 3248-357.TIF, the corresponding X is 357, which is between Xmin-2 and Xmax-2, that is, Xmin-2(315)<X(357)<Xmax-2(378). Therefore, the central meridian is determined to be L2, that is, 123, and the coordinate system file is CGCS2000-2.prj.

[0085] In the specific implementation of step S4, the coordinate system information thereof is updated according to the projection coordinate system of the tiled geospatial data file;

[0086] Specifically, the coordinate system information of the tiled geospatial data file is read. If the coordinate system information does not exist, the coordinate system is updated to the projected coordinate system. If the coordinate system information does exist, it is compared with the projected coordinate system determined in step 3. If they are the same, the coordinate system is not updated; otherwise, the coordinate system is updated. Updating the coordinate system means copying the i-th projected coordinate system template file determined in step 3 and renaming it to tiled geospatial data file.prj.

[0087] In this example, the coordinate system information of the H51G065021 file is read. If the coordinate system information does not exist, the coordinate system is updated. If the coordinate system information exists, the central meridian of the coordinate system is read and compared with the central meridian L1 calculated in step S3. If they are the same, the coordinate system does not need to be updated; if they are different, the coordinate system needs to be updated. Updating the coordinate system means copying the i-th projection coordinate system template file determined in step S3 and renaming it to the tiled geospatial data file .prj, that is, renaming CGCS2000-1.prj to H51G065021.prj.

[0088] Read the coordinate system of the 3250-642.dwg file. If the coordinate system does not exist, update it. If it does exist, compare the coordinate systems. If they are the same, no update is required. If they are different, update is required. Updating the coordinate system means copying the projected coordinate system template file CGCS2000-1.prj and renaming it to 3250-642.prj.

[0089] In the specific implementation of step S5, steps S3-S4 are repeated until the projection coordinate system setting of all the geospatial data files in the designated folder is completed;

[0090] Specifically, before traversal, the count i is set to 0, and steps 3 and 4 complete the count i plus 1. When the count i is less than the total number of files FCount that meet the file inspection requirements of claim 2, steps 3-4 are repeated until the count i is equal to the total number of files FCount.

[0091] Corresponding to the aforementioned embodiment of the method for setting a projection coordinate system for framed geographic spatial data, the present application also provides an embodiment of an apparatus for setting a projection coordinate system for framed geographic spatial data.

[0092] Figure 4 The present invention is a block diagram of a device for setting a projection coordinate system for tiled geographic spatial data according to an exemplary embodiment.

[0093] Reference Figure 4 , the apparatus may include:

[0094] The longitude range determination module 21 is used to analyze the composition and naming method of the geospatial data files in the specified folder, determine whether they meet the data processing requirements, and determine the longitude range of the study area;

[0095] The plane coordinate calculation module 22 is used to create different projection coordinate system templates according to the longitude range and calculate the plane coordinates of the maximum longitude and the minimum longitude of the study area under different projection coordinate systems;

[0096] The projection coordinate system determination module 23 is used to determine the projection coordinate system for the geospatial data files that meet the data processing requirements according to their respective file naming methods;

[0097] A coordinate system updating module 24 is used to update the coordinate system information of each geospatial data file according to the projection coordinate system of each frame;

[0098] The repetition module 25 is used to repeat steps S3-S4 until the projection coordinate system setting of all the geospatial data files in the designated folder is completed.

[0099] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0100] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0101] Accordingly, the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method for setting the projection coordinate system of the geospatial data. Figure 5 As shown in the figure, a hardware structure diagram of any device with data processing capability for a method for setting a projection coordinate system for geospatial data provided by an embodiment of the present invention is provided. Figure 5 In addition to the processor, memory, and network interface shown, any device with data processing capabilities in which the apparatus in the embodiment is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0102] Accordingly, the present application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the method for setting the projection coordinate system of the segmented geographic spatial data as described above. The computer-readable storage medium can be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium can also include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and can also be used to temporarily store data that has been output or is to be output.

[0103] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the contents disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed in this application.

[0104] It will be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A method for setting a projection coordinate system for geospatial data, characterized in that: include: S1: Analyze the composition and naming of geospatial data files in the specified folder to determine whether they meet the data processing requirements and determine the longitude range of the study area; S2: Create different projection coordinate system templates according to the longitude range, and calculate the plane coordinates of the maximum longitude and minimum longitude of the study area under different projection coordinate systems; S3: For the tiled geospatial data files that meet the data processing requirements, determine the projection coordinate system according to their respective file naming methods; S4: updating the coordinate system information of each geospatial data file according to the projection coordinate system of each tile; S5: Repeat steps S3-S4 until the projection coordinate system setting of all the geospatial data files in the designated folder is completed; Specifically, step S3 includes parsing the file names of the geospatial data that meet the data processing requirements without the file extension. If the string length of the file name is 10, convert the second and third characters into integers a, the fourth character is blc, take the last three characters of the file name and convert them into an integer b, calculate the center longitude L of the map sheet according to L = (a - 31) * 6 + (b - 0.5) * delta, and determine the specific zone projection coordinate system by comparing the center longitude L with the minimum longitude Limin and maximum longitude Limax of different projection coordinate systems. That is, when L is greater than Limin and L is less than or equal to Limax, use the i-th projection coordinate system, where delta is determined according to blc; If the file name format conforms to "number 1 - number 2", number 2 is compared with the minimum longitude and maximum longitude plane coordinate values ​​of different projection coordinate systems. If they are within the range, the projection coordinate system is adopted.

2. The method according to claim 1, characterized in that In step S1, it is determined whether the data processing requirements are met, including whether the extension is one of the formats of JPG, TIF, IMG, BMP, GRD, DWG, and SHP, and whether the file name conforms to the 10-digit length or "number-number" format. If any of the above data processing requirements are not met, subsequent data processing cannot be performed.

3. The method according to claim 1, characterized in that In step S1, the latitude and longitude range of the study area is determined by either of the following two methods: Manually enter the maximum longitude LMAX, maximum latitude BMAX, minimum longitude LMIN, and minimum latitude BMIN; Enter the administrative district name and automatically calculate the maximum longitude LMAX, maximum latitude BMAX, minimum longitude LMIN, and minimum latitude BMIN based on the pre-specified administrative district index.

4. The method according to claim 1, wherein Step S2 includes: According to the 3-degree zoning, when the study area spans different zones, n different projection coordinate systems need to be established: n = INT(LMAX / 3 + 0.5) - INT (LMIN / 3 + 0.5) + 1 The central meridian Li, minimum longitude Limin, and maximum longitude Limax of the i-th projection coordinate system are calculated according to the following formula, where i=1, 2, 3…n: Li = (INT (LMIN / 3 + 0.5) + i - 1) × 3 Limin = Li – 1.5 Limax = Li + 1.5 The Gauss projection coordinate forward calculation formula is used to calculate the plane coordinates of the maximum longitude LMAX and the minimum longitude LMIN of the study area in each zone projection coordinate system.

5. A device for setting a projection coordinate system for geospatial data, characterized in that: include: The longitude range determination module is used to analyze the composition and naming method of the geospatial data files in the specified folder, determine whether they meet the data processing requirements, and determine the longitude range of the study area; The plane coordinate calculation module is used to create different projection coordinate system templates according to the longitude range and calculate the plane coordinates of the maximum longitude and minimum longitude of the study area under different projection coordinate systems; The projection coordinate system determination module is used to determine the projection coordinate system of the geospatial data files that meet the data processing requirements according to their respective file naming methods; The coordinate system update module is used to update the coordinate system information of each geospatial data file according to the projection coordinate system of each tile; a repeating module, configured to repeat steps from the projection coordinate system determination module to the coordinate system update module until the projection coordinate system settings of all the tiled geospatial data files in the designated folder are completed; The projected coordinate system determination module specifically parses the file name without the file extension for the tiled geographic spatial data that meets the data processing requirements; If the string length of the file name is 10, convert the second and third characters into integers a, the fourth character is blc, take the last three characters of the file name and convert them into an integer b, calculate the center longitude L of the map sheet according to L = (a - 31) * 6 + (b - 0.5) * delta, and determine the specific zone projection coordinate system by comparing the center longitude L with the minimum longitude Limin and maximum longitude Limax of different projection coordinate systems. That is, when L is greater than Limin and L is less than or equal to Limax, use the i-th projection coordinate system, where delta is determined according to blc; If the file name format conforms to "number 1 - number 2", number 2 is compared with the minimum longitude and maximum longitude plane coordinate values ​​of different projection coordinate systems. If they are within the range, the projection coordinate system is adopted.

6. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.

7. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Geographic surveying and mapping framing vector data monomerization method and device and electronic equipment

    CN116108059A

  • CGCS2000 coordinate conversion method

    CN116244465A