CN115760821A - Method for generating map slice based on orthophoto map of unmanned aerial vehicle - Google Patents
Method for generating map slice based on orthophoto map of unmanned aerial vehicle Download PDFInfo
- Publication number
- CN115760821A CN115760821A CN202211501732.XA CN202211501732A CN115760821A CN 115760821 A CN115760821 A CN 115760821A CN 202211501732 A CN202211501732 A CN 202211501732A CN 115760821 A CN115760821 A CN 115760821A
- Authority
- CN
- China
- Prior art keywords
- map
- image
- slicing
- target
- orthophoto
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Processing Or Creating Images (AREA)
Abstract
The invention relates to the technical field of unmanned aerial vehicle image processing, in particular to a method for generating a map slice based on an orthographic image of an unmanned aerial vehicle, which comprises the following steps: setting a path of an orthophoto map tif file, a target map type to be matched and a target slicing level to be output; reading a tif image file to obtain information of an orthoimage; determining the geographic position of the image according to the projection information; and the image coordinate system is converted into a target map coordinate system, and the converted image is sliced. The invention can realize the conversion between different coordinate systems; the method is compatible with the multi-map tile rule; and can support cross-platform operation and simultaneously support Windows and Linux environments. The conventional tiles of the map are classified into one grade to eighteen grades, and nineteen grades or more of tiles can be loaded by combining the method with the high-precision aerial photograph of the unmanned aerial vehicle, so that the map is displayed finely, and energy is supplied to various industries; and the device is autonomous and controllable, and does not need to be used for payment.
Description
Technical Field
The invention relates to the technical field of unmanned aerial vehicle image processing, in particular to a method for generating a map slice based on an orthographic image of an unmanned aerial vehicle.
Background
The map geographic data are displayed in a two-dimensional plane, points in a three-dimensional space are mapped into the two-dimensional space in a projection mode, for a world map which is projected to be a plane, the map is divided into a plurality of map units in a cutting mode under different map levels, and each divided map unit is called a map tile.
When the map slicing tool cuts the map, the map can be cut step by step according to the pyramid principle, namely, a certain tile under a certain map grade can be cut into 4 tiles under the higher grade, the higher the tile grade is, the more the number of tiles forming the world map is, and the more detailed the map can be displayed, as shown in fig. 1. After the concept of map slicing appeared, many map slicing software tools were developed in the market, which are roughly divided into two categories: one is that the original GIS software adds the function of map slicing; another class is that some independent map-slicing tools are developed (e.g., global Mapper, mapTiler, etc.).
The principle of the software is similar to that of the technical implementation, but the two types of graph cutting tools have two defects: firstly, the software is a closed source and needs to be used for payment; the other map only supports foreign common maps and cannot be compatible with the domestic map standard. In the prior art, when a map slicing tool is used for cutting a map, the grade of a set map conventional tile is between one grade and eighteen grades, when the slicing grade is continuously increased, along with the increase of a map image layer, the load of the slicing tool is increased, the performance is reduced, the slicing requirement with higher precision cannot be met, and the real-time application cannot be met.
Disclosure of Invention
The invention aims to solve the defects in the background technology by providing a method for generating a map slice based on an orthophoto map of an unmanned aerial vehicle.
The technical scheme adopted by the invention is as follows:
the method for generating the map slice based on the orthophoto map of the unmanned aerial vehicle comprises the following steps:
s1.1: setting a path of an orthophoto map tif file, a target map type to be matched and a target slice grade to be output;
s1.2: reading the tif image file, and acquiring geographic transformation and projection information of the orthoimage;
s1.3: determining the geographic position of the image according to the projection information;
s1.4: and the image coordinate system is converted into a target map coordinate system, and the converted image is sliced.
As a preferred technical scheme of the invention: and in the S1.3, acquiring the upper left longitude and latitude and the lower right longitude and latitude of the image according to the projection information, and determining the geographic position of the image.
As a preferred technical scheme of the invention: in the S1.4, comparing the image coordinate system with the type of the target map, and when the coordinate system is consistent, slicing the orthophoto image; and when the coordinate systems are inconsistent, the image coordinate system is converted into a target map type coordinate, and then the orthophoto image is sliced.
As a preferred technical scheme of the invention: and after the contrast conversion of the image coordinate system is finished, matching a slicing rule which is suitable for the type of the target map according to the type of the target map, and slicing the converted image.
As a preferred technical scheme of the invention: in the S1.4, the range of the rows and columns under different levels is determined according to the upper left longitude and latitude, the lower right longitude and latitude, the slicing rule and the target slicing level.
As a preferred technical scheme of the invention: and in the slicing process, slicing the image step by step, and storing the map slices according to the storage paths of the grades, the rows and the columns.
As a preferred technical scheme of the invention: in the slicing rule, the line calculation formula is as follows:
wherein row is the row number of the tile; lat is latitude; zoom is the map zoom level.
As a preferred technical scheme of the invention: in the slicing rule, the following calculation formula is as follows:
wherein col is the column number of the tile; lon is longitude.
As a preferred technical scheme of the invention: in the slicing rule, the line offset calculation formula is as follows:
wherein row offset Is the offset of the row in which the orthography lies; lt lat The latitude of the upper left vertex of the orthographic picture; lt row Is the starting line number of the orthography; size is tile size.
As a preferred technical scheme of the invention: in the slicing rule, the column offset calculation formula is as follows:
wherein, col offset Is the offset of the column in which the orthography lies; lt lon Longitude for the top left vertex of the orthographic view; lt col Is the starting column number of the orthographic view.
Compared with the prior art, the method for generating the map slice based on the orthophoto map of the unmanned aerial vehicle has the following beneficial effects:
according to the method for generating the map slice based on the orthophoto map of the unmanned aerial vehicle, the conventional tiles of the map are in the grade from one grade to eighteen grades, and nineteen or more grades of tile loading can be realized by combining the high-precision aerial photograph of the unmanned aerial vehicle through the method, so that the map is displayed finely, and energy is supplied to all trades; and the device is autonomous and controllable, and does not need to be used for payment. Conversion among different coordinate systems can be realized; the method is compatible with the multi-map tile rule; and can support cross-platform operation and simultaneously support Windows and Linux environments.
Drawings
FIG. 1 is a diagram illustrating a map cutting pattern in the prior art;
fig. 2 is a flowchart of a method for generating a map slice based on an orthophoto map of a drone according to a preferred embodiment of the present invention.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and the features in the embodiments may be combined with each other, and the technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 2, a preferred embodiment of the present invention provides a method for generating a map slice based on an orthophoto map of an unmanned aerial vehicle, including the following steps:
s1.1: setting a path of an orthophoto map tif file, a target map type to be matched and a target slice grade to be output;
s1.2: reading the tif image file, and acquiring geographic transformation and projection information of the orthoimage;
s1.3: determining the geographic position of the image according to the projection information;
s1.4: and the image coordinate system is converted into a target map coordinate system, and the converted image is sliced.
And in the S1.3, acquiring the upper left longitude and latitude and the lower right longitude and latitude of the image according to the projection information, and determining the geographic position of the image.
In the S1.4, comparing the image coordinate system with the type of the target map, and when the coordinate system is consistent, slicing the orthophoto image; and when the coordinate systems are inconsistent, the image coordinate system is converted into a target map type coordinate, and then the orthophoto image is sliced.
And after the contrast conversion of the image coordinate system is finished, matching a slicing rule which is suitable for the type of the target map according to the type of the target map, and slicing the converted image.
In the S1.4, the range of the rows and columns under different levels is determined according to the upper left longitude and latitude, the lower right longitude and latitude, the slicing rule and the target slicing level.
And in the slicing process, the images are sliced step by step, and the map slices are stored according to the storage paths of the grades, the rows and the columns.
In the slicing rule, the line calculation formula is as follows:
wherein row is the row number of the tile; lat is latitude; zoom is the map zoom level.
In the slicing rule, the following calculation formula is as follows:
wherein col is the column number of the tile; lon is longitude.
In the slicing rule, the line offset calculation formula is as follows:
wherein, row offset Is the offset of the row in which the orthography lies; lt lat The latitude of the upper left vertex of the orthographic view; lt row Is the starting line number of the orthography; size is tile size.
In the slicing rule, the column offset calculation formula is as follows:
wherein col offset Is the offset of the column in which the orthographic view lies; lt lon Longitude for the top left vertex of the orthographic view; lt col Is the starting column number of the orthographic view.
In this embodiment, a tif file path of the acquired ortho-image, a target map type to be matched with the ortho-image, and a target slice level of the ortho-image to be output are preset.
After the setting is finished, the program reads the tif image file of the orthoimage, acquires the geographic transformation and projection information of the orthoimage according to the read tif image file, and acquires the upper left longitude and latitude and the lower right longitude and latitude of the image according to the projection information so as to determine the geographic position of the image. And comparing the image coordinate system with the type of the target map to be matched, and when the two coordinate systems are consistent, slicing the orthoimage according to the slicing rule. When the two coordinate systems are not consistent in comparison, the image coordinate system needs to be converted into a map coordinate system needing to be matched, and then the orthoimage is sliced according to the slicing rule. The program is built in to provide mutual conversion among a plurality of coordinate systems, and the conversion requirements of the coordinate systems of various map types can be met.
The program selects a slicing rule suitable for the map according to the type of the target map matched as required, the program is internally provided with a plurality of tile slicing rules of the map, and the program is compatible with a plurality of map tile rules and can be suitable for various map types. And cross-platform operation is also supported, windows and Linux environments can be simultaneously supported, and better experience is provided for users.
Determining the row and column ranges under different levels by the program according to the upper left longitude and latitude, the lower right longitude and latitude, the slicing rule and the target slicing level to be output of the orthoimage; and slicing the orthoimage step by step, and storing the map slices according to a storage path of 'grade/row/column'. The formula for calculating the row offset, the column offset and the row offset in the slicing rule is as follows:
the line calculation formula is as follows:
wherein row is the row number of the tile; lat is latitude; zoom is the map zoom level.
The following calculation formula is as follows:
wherein col is the column number of the tile; lon is longitude.
The line offset calculation formula is as follows:
wherein row _ offset is the offset of the row where the orthographic picture is located; lt _ lat is the latitude of the top left vertex of the orthographic view; lt _ row is the starting line number of the orthographical image; size is tile size.
The column offset calculation formula is as follows:
wherein col _ offset is the offset of the row in which the orthograph is located; lt _ lon is the longitude of the top left vertex of the orthographic view; lt _ col is the starting column number of the orthography.
Taking a point with a longitude of 90 degrees and a latitude of 0 degrees as an example, setting a map zoom level zoom of 5 levels, calculating a row number and a column number of a tile where the point with the longitude of 90 degrees and the latitude of 0 degrees is located, substituting into a row number calculation formula,
wherein row is the row number of the tile; lat is latitude; zoom is the map zoom level.
And is substituted into the column number calculation formula,
wherein col is the column number of the tile; lon is longitude.
The tile with longitude of 90 degrees and latitude of 0 degrees is obtained as the 24 th column tile in the 8 th row.
For the orthoimage needing to be sliced, combining the longitude and latitude of the vertex at the upper left corner and the longitude and latitude of the vertex at the lower right corner of the orthoimage, and the data of the initial row number, the initial column number and the tile size of the orthoimage are respectively according to
Line offset calculation formula:
wherein row offset The offset of the line where the ortho image is located; lt lat The latitude of the upper left vertex of the orthoimage; lt row Is the initial line number of the ortho image; size is tile size.
Column offset calculation formula:
wherein col offset Is the offset of the row in which the ortho image is located; lt lon Longitude of the top left vertex of the ortho image; lt col Is the starting column number of the ortho image.
And calculating to respectively obtain the row offset and the column offset of the orthoimage, so that the precision of the map image is improved, and the map image can be displayed more finely.
When a map is cut by a traditional map slicing tool, the set map conventional tile grade is between one grade and eighteen grades, and by the method, nineteen grades or more of tile loading can be realized by combining a high-precision aerial photograph of an unmanned aerial vehicle, so that a map image can be displayed more finely, energy is supplied to all trades, and the map precision of all trades is improved.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.
Claims (10)
1. A method for generating a map slice based on an orthophoto map of an unmanned aerial vehicle is characterized in that: the method comprises the following steps:
s1.1: setting a path of an orthophoto map tif file, a target map type to be matched and a target slicing level to be output;
s1.2: reading the tif image file, and acquiring geographic transformation and projection information of the orthoimage;
s1.3: determining the geographic position of the image according to the projection information;
s1.4: and the image coordinate system is converted into a target map coordinate system, and the converted image is sliced.
2. The method of generating map slices based on orthophoto maps of drones of claim 1, wherein: and in the S1.3, acquiring the upper left longitude and latitude and the lower right longitude and latitude of the image according to the projection information, and determining the geographic position of the image.
3. The method of generating map slices based on orthophoto maps of drones of claim 1, wherein: in the S1.4, comparing the image coordinate system with the type of the target map, and when the coordinate system is consistent, slicing the orthophoto image; and when the coordinate systems are inconsistent, the image coordinate system is converted into a target map type coordinate, and then the orthophoto image is sliced.
4. The method of generating map slices based on orthophotographs of a drone of claim 3, wherein: and after the contrast conversion of the image coordinate system is finished, matching a slicing rule which is suitable for the type of the target map according to the type of the target map, and slicing the converted image.
5. The method of generating map slices based on orthophotographs of a drone of claim 4, wherein: in the S1.4, the row and column ranges under different levels are determined according to the upper left longitude and latitude, the lower right longitude and latitude, the slicing rule and the target slicing level.
6. The method of generating map slices based on orthophotographs of a drone of claim 5, wherein: and in the slicing process, slicing the image step by step, and storing the map slices according to the storage paths of the grades, the rows and the columns.
9. The method for generating map slices based on orthophotomaps of drones according to claim 8, wherein: in the slicing rule, the line offset calculation formula is as follows:
wherein row offset Is the offset of the row in which the orthography lies; lt lat The latitude of the upper left vertex of the orthographic picture; lt row Is the starting line number of the orthography; size is tile size.
10. The method for generating map slices based on orthophotomaps of drones according to claim 9, wherein: in the slicing rule, the column offset calculation formula is as follows:
wherein, col offset Is the offset of the column in which the orthography lies; lt lon Longitude for the top left vertex of the orthographic view; lt col Is the starting column number of the orthographic view.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211501732.XA CN115760821A (en) | 2022-11-28 | 2022-11-28 | Method for generating map slice based on orthophoto map of unmanned aerial vehicle |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211501732.XA CN115760821A (en) | 2022-11-28 | 2022-11-28 | Method for generating map slice based on orthophoto map of unmanned aerial vehicle |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115760821A true CN115760821A (en) | 2023-03-07 |
Family
ID=85339356
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211501732.XA Pending CN115760821A (en) | 2022-11-28 | 2022-11-28 | Method for generating map slice based on orthophoto map of unmanned aerial vehicle |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115760821A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117218309A (en) * | 2023-09-21 | 2023-12-12 | 中国铁路设计集团有限公司 | Quick image map service manufacturing method considering linear band-shaped characteristics of railway |
CN117688122A (en) * | 2024-02-04 | 2024-03-12 | 民航成都电子技术有限责任公司 | Coordinate conversion method, device, equipment and medium for slice map |
-
2022
- 2022-11-28 CN CN202211501732.XA patent/CN115760821A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117218309A (en) * | 2023-09-21 | 2023-12-12 | 中国铁路设计集团有限公司 | Quick image map service manufacturing method considering linear band-shaped characteristics of railway |
CN117218309B (en) * | 2023-09-21 | 2024-02-20 | 中国铁路设计集团有限公司 | Quick image map service manufacturing method considering linear band-shaped characteristics of railway |
CN117688122A (en) * | 2024-02-04 | 2024-03-12 | 民航成都电子技术有限责任公司 | Coordinate conversion method, device, equipment and medium for slice map |
CN117688122B (en) * | 2024-02-04 | 2024-04-30 | 民航成都电子技术有限责任公司 | Coordinate conversion method, device, equipment and medium for slice map |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115760821A (en) | Method for generating map slice based on orthophoto map of unmanned aerial vehicle | |
US10964079B2 (en) | Method and apparatus for editing road element on map, electronic device, and storage medium | |
CN113506370B (en) | Three-dimensional geographic scene model construction method and device based on three-dimensional remote sensing image | |
US7415356B1 (en) | Techniques for accurately synchronizing portions of an aerial image with composited visual information | |
US10186083B1 (en) | Method and system for navigating in panoramic images using voxel maps | |
CN106599119B (en) | Image data storage method and device | |
CN111291584B (en) | Method and system for identifying two-dimensional code position | |
US7233691B2 (en) | Any aspect passive volumetric image processing method | |
CN109544683B (en) | Urban building group seismic response dynamic visualization method based on oblique photography data | |
EP3274964B1 (en) | Automatic connection of images using visual features | |
EP2518445A1 (en) | Database for a navigation device, method of outputting a three-dimensional representation of a terrain and method of generating a database | |
US20200349727A1 (en) | Obstacle detection method, mobile platform, and computer readable storage medium | |
US20130321411A1 (en) | Map tile selection in 3d | |
CN106131794A (en) | The method and device of indoor positioning | |
GB2562556A (en) | Thumbnail generation from panoramic images | |
CN110703805A (en) | Method, device and equipment for planning three-dimensional object surveying and mapping route, unmanned aerial vehicle and medium | |
US20180101981A1 (en) | Smoothing 3d models of objects to mitigate artifacts | |
CN112330537A (en) | Method for quickly splicing aerial images of unmanned aerial vehicle in emergency rescue activities | |
US8509522B2 (en) | Camera translation using rotation from device | |
CN114494627A (en) | City model generation method, device, equipment and computer readable storage medium | |
Aati et al. | Comparative study of photogrammetry software in industrial field | |
Jeon et al. | Comparative evaluation of commercial softwares in UAV imagery for cultural heritage recording: case study for traditional building in South Korea | |
Stal et al. | Digital representation of historical globes: methods to make 3D and pseudo-3D models of sixteenth century Mercator globes | |
US9852542B1 (en) | Methods and apparatus related to georeferenced pose of 3D models | |
CN110503123B (en) | Image positioning method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |