CN110619675A - OsgEarth-based surface vector data loading method - Google Patents
OsgEarth-based surface vector data loading method Download PDFInfo
- Publication number
- CN110619675A CN110619675A CN201910859013.7A CN201910859013A CN110619675A CN 110619675 A CN110619675 A CN 110619675A CN 201910859013 A CN201910859013 A CN 201910859013A CN 110619675 A CN110619675 A CN 110619675A
- Authority
- CN
- China
- Prior art keywords
- osgearth
- vector data
- tile
- picture
- data
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/04—Texture mapping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/05—Geographic models
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Graphics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Remote Sensing (AREA)
- Image Generation (AREA)
Abstract
The loading method of the OsgEarth-based surface vector data comprises the following steps: step 1, creating an image layer: configuring the surface vector data into an image layer of OsgEarth; step 2, converting vector data in a tile range into a grid picture by using an analysis plug-in gdal of OsgEarth; and 3, returning the grid picture to the corresponding tile, and loading and displaying the grid picture as the texture. The invention removes the most time-consuming triangular surface subdivision step in the OsgEarth original technology in the process, thereby remarkably improving the data loading speed.
Description
Technical Field
The invention belongs to the technical field of computer graphics, and particularly relates to a loading method of plane vector data based on OsgEarth.
Background
OsgEarth is an open-source three-dimensional digital earth engine, and has wide application in the GIS (geographic information system) industry due to the fact that OsgEarth has geographic and three-dimensional characteristics. The most typical application is the loading and display of geographic data, such as grid data like global high-resolution image data or vector data like national administrative divisions. Vector data generally comprises three types of points, lines and planes, and the loading efficiency of OsgEarth can generally meet the application requirements for point data or line data, but the loading speed of the prior art is very slow in processing plane data. Actually measuring a 20MB vector plane data, the loading time is more than 1 minute, and when the data is more than 200MB, the memory is increased rapidly, even the program is crashed, which obviously cannot meet the requirement of the user.
Disclosure of Invention
The invention aims to provide a loading method of OsgEarth-based surface vector data to solve the problem.
In order to achieve the purpose, the invention adopts the following technical scheme:
the loading method of the OsgEarth-based surface vector data comprises the following steps:
step 1, creating an image layer: configuring the surface vector data into an image layer of OsgEarth;
step 2, converting vector data in a tile range into a grid picture by using an analysis plug-in gdal of OsgEarth;
and 3, returning the grid picture to the corresponding tile, and loading and displaying the grid picture as the texture.
Further, in step 1, setting a data source path of the layer as specified surface vector data in a shape of shapefile, and specifying an analysis plug-in of the layer as gdal.
Further, in step 2, after the image layer is added to the earth three-dimensional scene, when the tile of the earth is loaded, data is requested from the image layer, and then the range information of the tile is used to convert the vector data of the corresponding range into a picture through gdal and return the picture to the tile.
Further, in step 3, after the earth tile obtains the picture, the picture is rendered as a texture map on the triangular surface of the tile, thereby completing the display of the vector data.
Rendering is achieved by OsgEarth.
Compared with the prior art, the invention has the following technical effects:
1) the invention removes the most time-consuming triangular surface subdivision step in the OsgEarth original technology in the process, thereby remarkably improving the data loading speed.
2) Because the vector data is directly rasterized, the memory used for storing the geometric vertexes in the original process can be omitted, and the memory is far larger than a raster picture, so that the memory consumption is greatly reduced.
Drawings
FIG. 1 is a flow chart of the method of the present invention
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The loading method of the OsgEarth-based surface vector data comprises the following steps:
step 1, creating an image layer: configuring the surface vector data into an image layer of OsgEarth;
step 2, converting vector data in a tile range into a grid picture by using an analysis plug-in gdal of OsgEarth;
and 3, returning the grid picture to the corresponding tile, and loading and displaying the grid picture as the texture.
In step 1, setting a data source path of a layer as specified surface vector data in a shape of shapefile, and simultaneously specifying an analysis plug-in of the layer as gdal.
In step 2, after the image layer is added to the earth three-dimensional scene, the tile of the earth requests data from the image layer when being loaded, and at this time, the vector data in the corresponding range is converted into a picture through gdal by using the range information of the tile and is returned to the tile.
In step 3, after the earth tile obtains the picture, the picture is rendered on a triangular surface of the tile as a texture map, so that the display of the vector data is completed.
Rendering is achieved by OsgEarth.
Taking loading of administrative division vector data of a certain city as an example, the current technical process of OsgEarth needs to generate a three-dimensional geometric patch first and then render the geometric patch on the terrain in a patch manner. And there are about 17000 geometries in this test data, and the current technology needs to traverse each geometry and perform triangulation again through its boundary points, where the speed of triangulation is very slow, which seriously affects the loading speed. Meanwhile, after the subdivision of the large number of geometric objects is finished, the geometric objects need to be stored as osg rendering objects, and the memory is high in cost. Therefore, the optimization aims to eliminate the two steps, because the vector plane data are rendered in a grid picture mode finally, the triangulation information of the final subdivision is not needed, if the grid data can be directly generated in a mode, the speed can be greatly improved theoretically, gdal has the function, the vector plane data are subjected to rasterization conversion through pixel-level operation, the speed is far higher than that of triangulation, and the optimized technology can be improved in loading efficiency and memory occupation.
The following experiments were performed using a FreeEarth platform:
on the same machine (CPU: Intel i7-3770 display card: NVIDIA Quadro K2000), the same 200MB data is loaded and compared by the prior art and the optimized technology, and the time consumption is as follows:
rendering scheme | Time consuming | Memory increment |
Prior art | More than 300 seconds | Greater than 5GB |
After optimization | Less than 10 seconds | Less than 500MB |
FreeEarth is a multi-industry freely-expandable secondary development GIS platform developed based on OpenSceneGraph and OsgEarth, and the platform carries out optimization transformation on the existing surface vector loading technology of OsgEarth, so that the loading speed of surface vector data is obviously improved, and the consumption of an internal memory is greatly reduced.
Claims (5)
1. The loading method of the OsgEarth-based surface vector data is characterized by comprising the following steps of:
step 1, creating an image layer: configuring the surface vector data into an image layer of OsgEarth;
step 2, converting vector data in a tile range into a grid picture by using an analysis plug-in gdal of OsgEarth;
and 3, returning the grid picture to the corresponding tile, and loading and displaying the grid picture as the texture.
2. The OsgEarth-based surface vector data loading method according to claim 1, wherein in step 1, the data source path of the layer is set as the specified surface vector data in the format of shapefile, and the parsing plug-in of the layer is specified as gdal.
3. The OsgEarth-based surface vector data loading method according to claim 1, wherein in step 2, after the image layer is added to the earth three-dimensional scene, when the tile of the earth is loaded, the tile requests data for the image layer, and then the tile range information is used to convert the vector data of the corresponding range into a picture through gdal and return the picture to the tile.
4. The OsgEarth-based surface vector data loading method as claimed in claim 1, wherein in step 3, after the picture is obtained from the earth tile, the earth tile is rendered as a texture map on a triangular surface of the tile, so as to complete the display of the vector data.
5. The loading method of OsgEarth-based surface vector data according to claim 4, wherein rendering is implemented by OsgEarth.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910859013.7A CN110619675B (en) | 2019-09-11 | 2019-09-11 | OsgEarth-based surface vector data loading method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910859013.7A CN110619675B (en) | 2019-09-11 | 2019-09-11 | OsgEarth-based surface vector data loading method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110619675A true CN110619675A (en) | 2019-12-27 |
CN110619675B CN110619675B (en) | 2023-04-18 |
Family
ID=68923195
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910859013.7A Active CN110619675B (en) | 2019-09-11 | 2019-09-11 | OsgEarth-based surface vector data loading method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110619675B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113568996A (en) * | 2021-07-29 | 2021-10-29 | 西安恒歌数码科技有限责任公司 | Multi-layer drop frame optimization method and system based on osgEarth |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090046093A1 (en) * | 2005-03-02 | 2009-02-19 | Navitime Japan Co., Ltd., | Map display device and map display method |
CN102542035A (en) * | 2011-12-20 | 2012-07-04 | 南京大学 | Polygonal rasterisation parallel conversion method based on scanning line method |
US20140200863A1 (en) * | 2013-01-11 | 2014-07-17 | The Regents Of The University Of Michigan | Monitoring proximity of objects at construction jobsites via three-dimensional virtuality in real-time |
US20150199458A1 (en) * | 2014-01-14 | 2015-07-16 | Energid Technologies Corporation | Digital proxy simulation of robotic hardware |
CN105718481A (en) * | 2014-12-05 | 2016-06-29 | 星际空间(天津)科技发展有限公司 | Massive topographic data organization and release method |
CN107810525A (en) * | 2015-04-30 | 2018-03-16 | 内部科技有限责任公司 | Node mesh generation for trellis |
CN108765576A (en) * | 2018-03-28 | 2018-11-06 | 中国人民解放军92859部队 | VIVE virtual earths based on OsgEarth roam browsing method |
CN108874905A (en) * | 2018-05-24 | 2018-11-23 | 西安恒歌数码科技有限责任公司 | A kind of high-efficiency storage method of magnanimity geographic information tile data |
CN109215103A (en) * | 2018-08-30 | 2019-01-15 | 西安恒歌数码科技有限责任公司 | A kind of high-volume text rendering method based on OSG |
-
2019
- 2019-09-11 CN CN201910859013.7A patent/CN110619675B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090046093A1 (en) * | 2005-03-02 | 2009-02-19 | Navitime Japan Co., Ltd., | Map display device and map display method |
CN102542035A (en) * | 2011-12-20 | 2012-07-04 | 南京大学 | Polygonal rasterisation parallel conversion method based on scanning line method |
US20140200863A1 (en) * | 2013-01-11 | 2014-07-17 | The Regents Of The University Of Michigan | Monitoring proximity of objects at construction jobsites via three-dimensional virtuality in real-time |
US20150199458A1 (en) * | 2014-01-14 | 2015-07-16 | Energid Technologies Corporation | Digital proxy simulation of robotic hardware |
CN105718481A (en) * | 2014-12-05 | 2016-06-29 | 星际空间(天津)科技发展有限公司 | Massive topographic data organization and release method |
CN107810525A (en) * | 2015-04-30 | 2018-03-16 | 内部科技有限责任公司 | Node mesh generation for trellis |
CN108765576A (en) * | 2018-03-28 | 2018-11-06 | 中国人民解放军92859部队 | VIVE virtual earths based on OsgEarth roam browsing method |
CN108874905A (en) * | 2018-05-24 | 2018-11-23 | 西安恒歌数码科技有限责任公司 | A kind of high-efficiency storage method of magnanimity geographic information tile data |
CN109215103A (en) * | 2018-08-30 | 2019-01-15 | 西安恒歌数码科技有限责任公司 | A kind of high-volume text rendering method based on OSG |
Non-Patent Citations (1)
Title |
---|
吴小东 等: "基于OSGEarth的城市三维场景构建", 《地理空间信息》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113568996A (en) * | 2021-07-29 | 2021-10-29 | 西安恒歌数码科技有限责任公司 | Multi-layer drop frame optimization method and system based on osgEarth |
CN113568996B (en) * | 2021-07-29 | 2023-05-16 | 西安恒歌数码科技有限责任公司 | Multi-layer frame dropping optimization method and system based on osgEarth |
Also Published As
Publication number | Publication date |
---|---|
CN110619675B (en) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11922534B2 (en) | Tile based computer graphics | |
JP5336067B2 (en) | Method and apparatus for processing graphics | |
JP2017527898A (en) | Bandwidth reduction using texture lookup with adaptive shading | |
KR20120096119A (en) | Graphic processor and early visibility testing method | |
CN101257149A (en) | Method for dividing aerial reflecting plane graticule based on structure electromagnetic coupling | |
CN104267940A (en) | Quick map tile generation method based on CPU+GPU | |
CN105122310A (en) | Intra-frame timestamps for tile-based rendering | |
KR20140073951A (en) | Apparatus and method of rendering bezier curve | |
CN113256782A (en) | Three-dimensional model generation method and device, storage medium and electronic equipment | |
US10192348B2 (en) | Method and apparatus for processing texture | |
CN110619675B (en) | OsgEarth-based surface vector data loading method | |
CN114820972A (en) | Contour line and/or contour surface generation method, system, device and storage medium | |
CN112115226B (en) | Map rendering method and map rendering device | |
CN107038729A (en) | A kind of digital meter panel method for drafting based on OpenGL ES | |
US10347034B2 (en) | Out-of-core point rendering with dynamic shapes | |
CN105354326A (en) | Spatial position indexing method and system | |
KR20160068204A (en) | Data processing method for mesh geometry and computer readable storage medium of recording the same | |
CN117274527A (en) | Method for constructing three-dimensional visualization model data set of generator equipment | |
Ma et al. | Rasterization of geometric primitive in graphics based on FPGA | |
Masood et al. | A novel method for adaptive terrain rendering using memory-efficient tessellation codes for virtual globes | |
Hui et al. | A dynamic load balancing algorithm for sort-first rendering clusters | |
CN116894933B (en) | Three-dimensional model comparison method, device, equipment and storage medium | |
CN116912395B (en) | Graphics hybrid rendering method and device based on OpenGL and storage medium | |
US20240169612A1 (en) | Graphics processing systems | |
CN113094536B (en) | Power transmission tower lightweight display method and device based on power grid GIM |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |