Marine weather image pixel coordinate and geographic coordinate conversion method

By identifying the projection parameters on the marine weather map and using the projection forward and inverse solution algorithms, the conversion from pixel coordinates to geographical coordinates is achieved, which solves the problem that the existing technology cannot convert non-Mercator projection weather maps, and provides accurate Weather geographical location information supports ship drivers in analyzing weather changes.

CN118733690APending Publication Date: 2024-10-01DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410722945.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing technology cannot convert pixel coordinates of marine weather images into geographical coordinates because marine weather maps use non-Mercator projection. The existing technology mainly converts pixel coordinates into geographical coordinates for Mercator projection chart images.

Method used

Identify the projection method of the weather map through the latitude and longitude grid on the image, determine the projection parameters, and use the projection forward and inverse solution algorithms to convert pixel coordinates into geographical coordinates, including obtaining the projection parameters, calculating the longitude and latitude range of the latitude and longitude grid, and converting the projection The coordinate sequence is pixel coordinates, and the cursor pixel coordinates are obtained for real-time conversion according to the mouse response event.

Benefits of technology

It achieves accurate conversion of pixel coordinates of weather images with different projection methods, assists ship pilots in grasping the accurate geographical location of important weather phenomena on weather maps, supports analysis of dynamic changes in sea area weather conditions, and provides support for weather changes on routes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733690A_ABST
    Figure CN118733690A_ABST
Patent Text Reader

Abstract

The invention provides a marine weather image pixel coordinate and geographic coordinate conversion method, which specifically comprises the following steps: identifying a projection mode of a weather map through a longitude and latitude grid on an image, and determining projection parameters; judging the longitude and latitude ranges of the longitude and latitude grids on the weather map image to obtain a geographic coordinate sequence of intersection points of each longitude and the highest latitude and the lowest latitude, and a geographic coordinate sequence of intersection points of each latitude and the highest longitude and the lowest longitude, and a geographic coordinate sequence of intersection points of each latitude and the highest longitude and the lowest longitude; converting the geographic coordinate sequence into a corresponding projection coordinate sequence according to a projection positive solution calculation formula; converting the obtained projection coordinate sequence into a pixel coordinate sequence; acquiring pixel coordinates of each point on the weather map image and converting the pixel coordinates into projection coordinates; and converting the projection coordinates according to a projection inverse solution algorithm to obtain geographic coordinates of each point. According to the method, the longitude and latitude grids can be drawn on the weather map image, the longitude and latitude grids are consistent with original longitude and latitude grids, and the conversion precision from pixel coordinates to geographic coordinates is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of marine transportation technology, and in particular to a method for converting pixel coordinates of a marine weather map into geographic coordinates. Background Art

[0002] The various weather phenomena depicted on the marine weather map images are drawn with special symbols on specific projection methods, including Lambert projection, polar plane projection and other maps; in order to accurately grasp the geographical location of these symbols, the pixel coordinates in the weather map must be converted into corresponding geographical coordinates.

[0003] The prior art converts pixel coordinates and geographic coordinates of Mercator projection nautical chart images, but most ship weather maps use non-Mercator projections (such as Lambert projection). Therefore, the prior art cannot achieve the conversion of weather map image pixel coordinates to geographic coordinates. Summary of the invention

[0004] According to the technical problems raised above, a method for converting pixel coordinates of ship weather maps into geographic coordinates is provided. The present invention can accurately convert the pixel coordinates of weather maps of different projection modes obtained by ships into corresponding geographic coordinates, and assist the drivers of ocean-going and offshore ships to grasp the accurate geographic locations of important weather phenomena on ship weather maps.

[0005] The technical means adopted by the present invention are as follows:

[0006] A method for converting pixel coordinates of a marine weather map into geographic coordinates, the specific steps comprising:

[0007] S1. Identify the projection mode of the weather map through the longitude and latitude grid on the image and determine the projection parameters;

[0008] S2, determining the latitude and longitude range of the longitude and latitude grid on the weather map image, obtaining the geographic coordinate sequence of the intersection of each longitude with the highest latitude and the lowest latitude, and the geographic coordinate sequence of the intersection of each latitude with the maximum longitude and the minimum longitude, and converting the geographic coordinate sequence into the corresponding projection coordinate sequence according to the projection positive solution calculation formula;

[0009] S3, converting the projection coordinate sequence obtained in S2 into a pixel coordinate sequence;

[0010] S4, obtaining the pixel coordinates of the cursor position on the image from the mouse response event and converting them into projection coordinates;

[0011] S5. Convert the projection coordinates into corresponding geographic coordinates according to the projection inverse algorithm.

[0012] Furthermore, the step S1 specifically includes:

[0013] The projection mode of the weather map is identified by the longitude and latitude grid on the image. The projection parameters include the latitude of the origin The longitude of the origin is λ0, the latitude of the first standard parallel is and the second standard parallel latitude

[0014] Furthermore, the step S2 specifically includes:

[0015] Connect each meridian to the highest latitude Latitude and minimum latitude The geographic coordinate sequence of the intersection of the latitude lines is expressed as The latitude and the maximum longitude (λ max ) meridian and minimum longitude (λ min )The geographic coordinate sequence of the meridian intersection is expressed as According to the projection solution calculation formula, the above two geographic coordinate sequences are converted into the corresponding projection coordinate sequence LonX = [(x min ,y0),(x max ,y0),(x min ,y1),(x max ,y1)…] and LatY=[(x0,y min ),(x0,y max ),(x1,y min ),(x1,y max )…];

[0016] The correct solution is calculated as follows:

[0017] x=r cosθ, y=r0-r cosθ;

[0018]

[0019] θ=n(λ-λ0)

[0020]

[0021]

[0022] Where r is the geographic latitude The radian value; r0 is the latitude of the origin , θ is the difference between λ and λ0, q represents the equal latitude, t represents the intermediate parameter, m represents the ratio of the latitude circle radius of the ground point to a, and m1 and m2 correspond to and n represents the cone constant, e is the first eccentricity, f is the flattening, and a and b are the major and minor axes of the earth's ellipsoid respectively.

[0023] Furthermore, the step S3 specifically includes:

[0024] The projection coordinate sequence obtained in S2 is converted into a pixel coordinate sequence PixelX = [(P xmin ,P y0 ),(P xmax ,P y0 ),(P xmin ,P y1 ),(P xmax ,P y1 )…] and PixelY=[(P x0 ,P ymin ),(P x0 ,P ymax ),(P x1 ,P ymin ),(P x1 ,P ymax )…], set the scale parameters, and draw the longitude and latitude grid on the weather map to make it consistent with the original longitude and latitude grid on the weather map.

[0025] Furthermore, the step S4 specifically includes:

[0026] Get the pixel coordinates of the cursor on the image from the mouse response event (P x ,P y ), and the corresponding projection coordinates (x, y) are obtained according to the conversion method between pixel coordinates and projection coordinates.

[0027] Furthermore, the step S5 specifically includes:

[0028] The inverse calculation formula is as follows:

[0029]

[0030] According to the projection inverse algorithm, the projection coordinates (x, y) are converted into geographic coordinates.

[0031] Furthermore, a storage medium is provided, the storage medium comprising a stored program, wherein when the program is run, the method for converting pixel coordinates of a marine weather map into geographic coordinates is executed.

[0032] Furthermore, an electronic device includes a memory, a processor, and an extreme machine program stored in the memory and executable on the processor, wherein the processor executes the method for converting pixel coordinates of a marine weather map into geographic coordinates through the computer program.

[0033] Compared with the prior art, the present invention has the following advantages:

[0034] The present invention proposes a method for converting pixel coordinates of ship weather maps to geographic coordinates. The method can accurately convert the pixel coordinates of weather maps of different projection modes obtained by ships into corresponding geographic coordinates, and assist the drivers of ocean-going and offshore ships to grasp the accurate geographic locations of important weather phenomena on ship weather maps. Based on the changes in the geographic coordinates of various weather phenomena on weather maps at different times of continuous reception, the dynamic changes of the weather situation in the sea area where the ship is located can be analyzed, and support can be provided for the ship drivers to analyze and judge the weather changes on the route.

[0035] The present invention proposes a method for converting the pixel coordinates of a weather map into geographic coordinates by using an inverse algorithm for weather map projection. When the mouse pointer moves on a weather image, the accurate geographic coordinates of the location of the cursor pointer can be calculated in real time. The method can draw a longitude and latitude grid on the weather map image based on the origin coordinates, reference latitudes, central meridians and other parameters of the weather map projection. The grid is completely consistent with the original longitude and latitude grid on the weather map, thereby ensuring the accuracy of the conversion from pixel coordinates to geographic coordinates.

[0036] Based on the above reasons, the present invention can be widely promoted in the field of marine transportation. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0038] Figure 1 The present invention is a flow chart of the method for converting pixel coordinates of a marine weather map into geographic coordinates. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0041] like Figure 1 As shown, the present invention provides a method for converting pixel coordinates of a marine weather map into geographic coordinates, and the specific steps include:

[0042] S1. Identify the projection mode of the weather map through the longitude and latitude grid on the image and determine the projection parameters;

[0043] In specific implementation, as a preferred embodiment of the present invention, the step S1 specifically includes:

[0044] The projection mode of the weather map is identified by the longitude and latitude grid on the image. The projection parameters include the latitude of the origin The longitude of the origin is λ0, the latitude of the first standard parallel is and the second standard parallel latitude

[0045] S2, determining the latitude and longitude range of the longitude and latitude grid on the weather map image, obtaining the geographic coordinate sequence of the intersection of each longitude with the highest latitude and the lowest latitude, and the geographic coordinate sequence of the intersection of each latitude with the maximum longitude and the minimum longitude, and converting the geographic coordinate sequence into the corresponding projection coordinate sequence according to the projection positive solution calculation formula;

[0046] In specific implementation, as a preferred embodiment of the present invention, step S2 specifically includes:

[0047] Connect each meridian to the highest latitude Latitude and minimum latitude The geographic coordinate sequence of the intersection of the latitude lines is expressed as The latitude and the maximum longitude (λ max ) meridian and minimum longitude (λ min )The geographic coordinate sequence of the meridian intersection is expressed as According to the projection solution calculation formula, the above two geographic coordinate sequences are converted into the corresponding projection coordinate sequence LonX = [(x min ,y0),(x max,y0),(x min ,y1),(x max ,y1)…] and LatY=[(x0,y min ),(x0,y max ),(x1,y min ),(x1,y max )…];

[0048] The correct solution is calculated as follows:

[0049] x=r cosθ, y=r0-r cosθ;

[0050]

[0051] θ=n(λ-λ0)

[0052]

[0053]

[0054] Where r is the geographic latitude The radian value; r0 is the latitude of the origin , θ is the difference between λ and λ0, q represents the equal latitude, t represents the intermediate parameter, m represents the ratio of the latitude circle radius of the ground point to a, and m1 and m2 correspond to and n is the cone constant (ratio), e is the first eccentricity, f is the flattening, a and b are the major and minor axes of the earth ellipsoid respectively.

[0055] S3, converting the projection coordinate sequence obtained in S2 into a pixel coordinate sequence;

[0056] In specific implementation, as a preferred embodiment of the present invention, step S3 specifically includes:

[0057] The projection coordinate sequence obtained in S2 is converted into a pixel coordinate sequence PixelX = [(P xmin ,P y0 ),(P xmax ,P y0 ),(P xmin ,P y1 ),(P xmax ,P y1 )…] and PixelY=[(P x0 ,P ymin ),(P x0 ,P ymax ),(P x1 ,P ymin ),(P x1 ,P ymax)…], set the scale parameters, and draw the longitude and latitude grid on the weather map to make it consistent with the original longitude and latitude grid on the weather map.

[0058] S4, obtaining the pixel coordinates of the cursor position on the image from the mouse response event and converting them into projection coordinates;

[0059] In specific implementation, as a preferred embodiment of the present invention, step S4 specifically includes:

[0060] Get the pixel coordinates of each point on the weather map image (P x ,P y ), and the corresponding projection coordinates (x, y) are obtained according to the conversion method between pixel coordinates and projection coordinates.

[0061] S5. Convert the projection coordinates into corresponding geographic coordinates according to the projection inverse algorithm.

[0062] In specific implementation, as a preferred embodiment of the present invention, step S5 specifically includes:

[0063] The inverse calculation formula is as follows:

[0064]

[0065] According to the projection inverse algorithm, the projection coordinates (x, y) are converted into geographic coordinates.

[0066] In a specific implementation, as a preferred embodiment of the present invention, a storage medium includes a stored program, wherein when the program is run, the method for converting pixel coordinates of a ship weather map into geographic coordinates is executed.

[0067] In a specific implementation, as a preferred embodiment of the present invention, an electronic device includes a memory, a processor, and an extreme machine program stored in the memory and executable on the processor, and the processor executes the method for converting pixel coordinates of a marine weather map into geographic coordinates through the computer program.

[0068] Example

[0069] like Figure 1 As shown, the present invention provides a method for converting pixel coordinates of a marine weather map to geographic coordinates. Taking the weather map of East Asia and Northwest Pacific released by JMH in Tokyo, Japan as an example, the coordinates of a certain point on the map are selected for calculation. The specific steps are as follows:

[0070] Determine the projection method of the weather map. The latitude lines on the weather map are concentric arcs, and the longitude lines are radial straight lines that converge toward the poles. From this, we can know that the projection method of the weather map released by the JMH station in Tokyo, Japan is the conformal conic projection, that is, the Lambert projection;

[0071] Determine Lambert projection parameters, including the latitude of the origin The longitude of the origin is λ0, the latitude of the first standard parallel is Latitude of the second standard parallel

[0072] Determine the latitude and longitude range of the longitude and latitude grid on the weather map image, select the geographic coordinates (150.06437428193647, 29.81445952167136), and calculate the projection coordinates (1236868.9157351058, -199330.11432900373) using the Lambert's correct solution formula;

[0073] The obtained projection coordinates are converted into pixel coordinates. The projection coordinates are (1236868.9157351058, -199330.11432900373). The pixel coordinates (950, 605) are obtained by converting the projection coordinates and the pixel coordinates. The appropriate scale parameters are set and the longitude and latitude grid is drawn on the weather map to make it consistent with the original longitude and latitude grid on the weather map.

[0074] Get the pixel coordinates of the cursor on the weather map image by the mouse response event (P x ,P y ), according to the conversion between pixel coordinates and projection coordinates, the corresponding Lambert projection coordinates (x, y) are obtained. The pixel coordinates (950, 605) are converted between pixel coordinates and Lambert projection coordinates to obtain projection coordinates (1236868.9157351058, -199330.11432900373);

[0075] According to the Lambert projection inverse solution algorithm, the projection coordinates (x, y) are converted into geographic coordinates The projection coordinates (1236868.9157351058, -199330.11432900373) are obtained by the Lambert projection inverse solution algorithm to obtain the geographic coordinates (150.06437428193647, 29.81445952167136);

[0076] Since the projection format and coverage area of ​​the weather maps issued by the same meteorological station remain unchanged, this technical solution can be applied to all weather maps issued by the meteorological fax station.

[0077] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0078] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0079] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0080] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0081] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0082] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for converting pixel coordinates of a marine weather map into geographic coordinates, characterized in that: The specific steps include: S1. Identify the projection mode of the weather map through the longitude and latitude grid on the image and determine the projection parameters; S2, determining the latitude and longitude range of the longitude and latitude grid on the weather map image, obtaining the geographic coordinate sequence of the intersection of each longitude with the highest latitude and the lowest latitude, and the geographic coordinate sequence of the intersection of each latitude with the maximum longitude and the minimum longitude, and converting the geographic coordinate sequence into the corresponding projection coordinate sequence according to the projection positive solution calculation formula; S3, converting the projection coordinate sequence obtained in S2 into a pixel coordinate sequence; S4, obtaining the pixel coordinates of the cursor position on the image from the mouse response event and converting them into projection coordinates; S5. Convert the projection coordinates into corresponding geographic coordinates according to the projection inverse algorithm.

2. The method for converting pixel coordinates of a marine weather map to geographic coordinates according to claim 1, characterized in that: The step S1 specifically includes: The projection mode of the weather map is identified by the longitude and latitude grid on the image. The projection parameters include the latitude of the origin The longitude of the origin is λ0, the latitude of the first standard parallel is and the second standard parallel latitude 3. The method for converting pixel coordinates of a marine weather map to geographic coordinates according to claim 1, characterized in that: The step S2 specifically includes: Connect each meridian to the highest latitude Latitude and minimum latitude The geographic coordinate sequence of the intersection of the latitude lines is expressed as The latitude and the maximum longitude (λ max ) meridian and minimum longitude (λ min )The geographic coordinate sequence of the meridian intersection is expressed as According to the projection solution calculation formula, the geographic coordinate sequence is converted into the corresponding projection coordinate sequence LonX = [(x min ,y0),(x max ,y0),(x min ,y1),(x max ,y1)…] and LatY=[(x0,y min ),(x0,y max ),(x1,y min ),(x1,y max )…]; The correct solution is as follows: x = rcosθ, y = r0 - rcosθ; θ=n(λ-λ0) Where r is the geographic latitude The radian value; r0 is the latitude of the origin , θ is the difference between λ and λ0, q represents the equal latitude, t represents the intermediate parameter, m represents the ratio of the latitude circle radius of the ground point to a, and m1 and m2 correspond to and n represents the cone constant, e is the first eccentricity, f is the flattening, and a and b are the major and minor axes of the earth's ellipsoid respectively.

4. The method for converting pixel coordinates of a marine weather map to geographic coordinates according to claim 1, characterized in that: The step S3 specifically includes: Convert the projection coordinate sequence obtained in S2 into a pixel coordinate sequence: PixelX=[(P xmin ,P y0 ),(P xmax ,P y0 ),(P xmin ,P y1 ),(P xmax ,P y1 )…] and PixelY=[(P x0 ,P ymin ),(P x0 ,P ymax ),(P x1 ,P ymin ),(P x1 ,P ymax )…], set the scale parameters, and draw the longitude and latitude grid on the weather map to make it consistent with the original longitude and latitude grid on the weather map.

5. The method for converting pixel coordinates of a marine weather map to geographic coordinates according to claim 1, characterized in that: The step S4 specifically includes: Get the pixel coordinates of the cursor on the image from the mouse response event (P x ,P y ), and the corresponding projection coordinates (x, y) are obtained according to the conversion method between pixel coordinates and projection coordinates.

6. The method for converting pixel coordinates of a marine weather map to geographic coordinates according to claim 1, characterized in that: The step S5 specifically includes: The inverse calculation formula is as follows: According to the projection inverse algorithm, the projection coordinates (x, y) are converted into geographic coordinates.

7. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is run, the method according to any one of claims 1 to 6 is executed.

8. An electronic device comprising a memory, a processor, and an extreme machine program stored in the memory and executable on the processor, characterized in that: The processor executes the method according to any one of claims 1 to 6 by running the computer program.

Citation Information

Cited By

  • High-latitude nautical chart projection selecting and switching method

    CN122384839A

  • High latitude chart projection selection and switching method

    CN122384839B