CN103678658B - Device for storing altitude data of terrain and device for reading altitude data of terrain - Google Patents

Device for storing altitude data of terrain and device for reading altitude data of terrain Download PDF

Info

Publication number
CN103678658B
CN103678658B CN201310720760.5A CN201310720760A CN103678658B CN 103678658 B CN103678658 B CN 103678658B CN 201310720760 A CN201310720760 A CN 201310720760A CN 103678658 B CN103678658 B CN 103678658B
Authority
CN
China
Prior art keywords
data
module
plot
index
altitude 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.)
Active
Application number
CN201310720760.5A
Other languages
Chinese (zh)
Other versions
CN103678658A (en
Inventor
吴黎明
黄建超
张士广
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dayang Technology Development Inc
Original Assignee
Beijing Dayang Technology Development Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Dayang Technology Development Inc filed Critical Beijing Dayang Technology Development Inc
Priority to CN201310720760.5A priority Critical patent/CN103678658B/en
Publication of CN103678658A publication Critical patent/CN103678658A/en
Application granted granted Critical
Publication of CN103678658B publication Critical patent/CN103678658B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • Instructional Devices (AREA)

Abstract

The invention relates to a device for storing altitude data of terrain and a device for reading the altitude data of the terrain. The device for storing the altitude data of the terrain comprises an altitude data partitioning module, a data compression processing module, an index building module and an index optimization module. The device for reading the altitude data of the terrain comprises a compressed altitude file extraction module, a primary index searching module, a secondary index searching module, an original altitude data recovery module and a data output module. According to the device for storing the altitude data of the terrain and the device for reading the altitude data of the terrain, due to the mode that the two-level indexes are set up, storage and reading of mass repeated data are omitted, the volume of stored data is greatly reduced, and the reading speed of the altitude data is increased; the retrieval speed is increased through the grading and partitioning compressed altitude file storage mode; due to the fact that the altitude data are stored in an altitude difference data storage mode, the data volume can be reduced by 30%-50%, and the volume of the stored data is obviously reduced.

Description

A kind of terrain elevation data storage and the device reading
Technical field
The present invention relates to the present invention relates to a kind of storage of terrain elevation data and the device reading, being a kind of computer data The device of compression, is a kind of storage of region altitude data and the quick device reading data.
Background technology
The data of GIS-Geographic Information System is extremely huge, even if a relatively single altitude data(The height above sea level in geographical position Highly)The data volume of the required precision of general rank is also quite surprising, for example:The elevation of the whole earth is from minimum point to peak Altitude range be -154m 8848m, if in units of rice store elevation, each height value should with 2 bytes store, that , the thousands of G spaces of storage needs of the earth altitude data of 30m precision.This storage size is for most application Unacceptable.Certainly as a rule it is not necessary that storing the altitude data in the whole world, but the high number of passes in even a certain area According to its data volume is also quite big although the amount of storage of the hardware memory system in modern times is quite big, but how quickly to read These data are also a critically important problem.
Content of the invention
For solving problem of the prior art, the present invention proposes a kind of terrain elevation data storage of whole world and the device reading. Described device can greatly compress the memory space of altitude data, and can realize reading at a high speed.
The object of the present invention is achieved like this:A kind of device of terrain elevation data storage, described device includes:Elevation Data division module, data compression process module, module, optimiged index module set up in index.Wherein:
Altitude data division module:For original altitude data is divided into one or more parts by different regions, will Each part is stored as an elevation file;Data compression process mould submitted to by original altitude data file for each part Block is processed, and sets up module foundation index by index, completes optimiged index by optimiged index module and processes;
Data compression process module:If for included area in each elevation file is divided into by latitude and longitude Dry less longitudinal arrangement and transversely arranged plot, for the corresponding generation of each elevation file, one is compressed elevation file, raw Become and in compression elevation file processes, the original altitude data in each plot is compressed processing and stores, data compression process mould Block includes:Parcel division submodule, a reference value acquisition submodule, species division submodule, data block sub-module stored, wherein:
Parcel division submodule:Included area in each elevation file is divided into several more by latitude and longitude Little longitudinal arrangement and transversely arranged plot, send following three resume module to the original altitude data in each plot;
A reference value acquisition submodule:For compare and calculate this plot each point original altitude data, take minimum of a value make On the basis of be worth;
Species divides submodule:For the height value of each point in original for this plot altitude data is compared with a reference value, meter Calculate the difference obtaining between the height value of each point and a reference value, using the maximum of all differences in this plot as this plot Big difference, determines the species value of a Difference Storage according to maximum difference for this plot;
Data block sub-module stored:For this plot altitude data is stored in compression elevation file by following form:
Species value, takies a byte;A reference value, takies two bytes;Difference, difference be difference according to species value by Different data length storages, the byte number shared by difference according to the size variation of the species value of Difference Storage, samely Each difference of block takies same byte number storage;
Module set up in index:Each compression elevation file is set up with two-stage index, the first order index of described two-stage index For pointer, described pointer points to the initial address of the second level index in a file or a row plot, and the of described two-stage index Secondary index is the storage address in this compression elevation file for the altitude data in this plot;
Optimiged index module:For the altitude data storage address in the plot of all for height value invalid values is modified to- 1, the height value by plot whole in a file or a row is all that the one-level index point of invalid value is modified to -1.
Further, described elevation file pass through by the regional altitude data through map projection according to longitudinal or Person's latitude direction is divided into several pieces to obtain, and each of which part corresponds to an elevation file.
Further, described maximum difference be divided into more than 255, more than 15 and less than or equal to 255, more than zero and Less than or equal to 15, null four species, the species value defining Difference Storage respectively is ZL1, ZL2, ZL3, ZL4;Described The storage mode of the difference of four species is:All differences in the plot that species value is ZL1 adopt 16bit storage, by species Be worth all differences in the plot for ZL2 using 8bit storage, species value is ZL3 all differences in plot deposited using 4bit Storage, all differences in the plot being ZL4 for species value then do not store.
Further, described division, is according to 2nQuantity determines.
Further, the corresponding two-stage index of each part can be stored in index with the altitude data after processing Compression elevation file in.
Further, the corresponding two-stage index of each part and the altitude data after process are respectively stored in index file In compression elevation file.
Further, the two-stage index of whole altitude data various pieces can be stored in a total index file.
A kind of reading device of the altitude data reading above-mentioned storage altitude data device storage, described device includes: Compression elevation file extraction module, one-level index search module, secondary index searching modul, original altitude data recovery module, Data outputting module, wherein:
Compression elevation file extraction module:For corresponding compression elevation literary composition is found according to the position of altitude data to be searched Part;
One-level index search module:The file being located for reading position or the one-level index in a row plot, judge Whether the value of this one-level index is " -1 ", if "Yes", by the value of this file or all altitude datas in all plot of row It is set to default value, and submits to data outputting module to export, if "No", secondary index is carried out by secondary index searching modul Read and search;
Secondary index searching modul:For the secondary index in reading position place plot, judge that whether this secondary index is " -1 ", if "Yes", the value of all for this plot altitude datas is set to default value, and submits to data outputting module to export, if "No" then carries out altitude data recovery by original altitude data recovery module;
Original altitude data recovery module is used for from compression elevation file, reads and recover the original high number of passes in this plot According to original altitude data recovery module includes again:Altitude data storage location searches submodule, species reading submodule, benchmark Value reading submodule, difference reading submodule, original altitude data calculating sub module, wherein:
Altitude data storage location searches submodule:For the address according to secondary index, find this plot altitude data The storage location being located in this compression elevation file;
Species reading submodule:For reading this plot altitude data species value, obtain the storage mode of difference;
A reference value reading submodule:For reading a reference value;
Difference reading submodule:Read difference data for the storage mode according to difference;
Original altitude data calculating sub module:For by a reference value and difference value, obtaining original altitude data;
Data outputting module:For the altitude data recovering is exported, altitude data herein can be calculate after extensive The original altitude data appeared again or the invalid value directly filled according to the information for -1 for the index.What the present invention produced has Beneficial effect is:The present invention, by way of building two-stage index, excludes storage and the reading of a large amount of repeated datas, greatly reduces reading The amount of fetching data, accelerates the speed reading data.Classification, the elevation document storage mode of piecemeal also accelerate the speed of reading. The data storage method of depth displacement is taken in the storage of altitude data, makes data volume reduce 30% 50%, the minimizing of data storage amount Fairly obvious.
Brief description
The invention will be further described with reference to the accompanying drawings and examples.
Fig. 1 is the principle schematic of terrain elevation data storage device described in the embodiment of the present invention one;
Fig. 2 is the original altitude data matrix of the citing 1 of inventive embodiments one;
Fig. 3 is the difference data matrix of the citing 1 of the embodiment of the present invention one;
Fig. 4 is the original altitude data matrix of the citing 2 of the embodiment of the present invention one;
Fig. 5 be the embodiment of the present invention one be citing 2 difference data matrix;
Fig. 6 is the principle schematic of terrain elevation data reading device described in the embodiment of the present invention one.
Specific embodiment
Embodiment one:
The present embodiment is a kind of terrain elevation data storage device.For earth elevation, there are two significantly spies Point, one is the area having a large amount of elevations to be invalid value, this is because earth altitude data is directed to land typically by satellite Region is acquired, and on the earth, much valid data cannot be adopted in place, such as in high latitude area, 83 degree of north latitude and south latitude 83 More than degree it is usually free of valid data;For pelagic division, the big lake in inland etc. part there is no valid data yet it is generally recognized that These local values are invalid values, and the elevation for pelagic division and inland big lake typically has other means offer.Somewhere Height value be invalid value when, the height value can not possibly exist typically this elevation put is designated as on the earth of a fixation, such as 9999 meters, or -250 meters etc., so when software read so can not possibly in esse height value when it may determine that being The height value of this point is invalid value, and the invalid height value of the present embodiment is set to -250 meters.Another is that have substantial amounts of putting down in earth's surface Former, there is substantial amounts of elevation drop to be less than 255m, even less than 16m or 4m in the range of certain block.The present embodiment is just It is that this two features that make use of earth altitude data are processed to altitude data.Excluded greatly with the mode of index of definition first Amount elevation is the data of invalid value.The mode taken for second feature is:The minimum height values obtaining in a block are made Based on, then calculate in this block other with respect to the difference of minimum height values, the size according to difference selects simultaneously Different memory spaces, because difference is less, saving memory space that can be more, improves access speed.On this basis, also may be used Global altitude data is stored in the way of different stage, different stage represents different data detailed levels.For The data of every one-level, is divided into multiple files and stores according to such scheme.The present embodiment described device implement principle such as Under:
The present embodiment methods described includes two aspects:The device of terrain elevation data storage and terrain elevation data read Device.Wherein:.
The device of terrain elevation data storage includes:Altitude data division module, data compression process module, index is set up Module, optimiged index module.Wherein:
Altitude data division module:For original altitude data is divided into one or more parts by different regions, will Each part be stored as an elevation file be directed to each part original altitude data elevation file submit at data compression Reason resume module, and module foundation index is set up by index, optimiged index is completed by optimiged index module and processes;
Data compression process module:For included area in each file is divided into several by latitude and longitude Less longitudinal arrangement and transversely arranged plot, generate a compression elevation file for each elevation file is corresponding, generate pressure In contracting elevation file processes, the original altitude data in each plot is compressed processing and stores.Data compression process module bag Include:Parcel division submodule, a reference value acquisition submodule, species divides submodule, data block sub-module stored.
Altitude data division module is used for for global altitude data being divided into one or many by earth surface different regions Individual part, each part is stored as a file.The elevation in the storage whole world, the problem initially encountering is how zoning is entered Row data storage.For improving retrieval rate, typically all data will not be stored in a file, science and suitable draw Subregion, can obtain the effect got twice the result with half the effort.In file division, the present embodiment considers that emphatically file size should compare average Problem.According to the feature of spherical object surface area, the interval earth surface of Same Latitude amasss can be increasingly when close to the two poles of the earth Little, and close to equator when the interval earth surface of Same Latitude amass can be increasing;And the surface obtaining along warp direction decile Long-pending is consistent.Therefore, the data of the block arranging by longitudinal is placed in an elevation file, by thus according to longitude Dividing it is possible to referred to as longitude file, big according to the surface area being stored in the longitude file that each longitude divides Body phase is with the longitude file size difference of different longitudes is little.But if the block of same latitude decile is placed on a latitude literary composition In part, connecing the surface area being stored in equatorial latitude file will be very huge, and stored in high latitudes Surface area will be little, and the surface area gap being stored in the latitude file of different latitude is larger.Therefore, the present embodiment Divide the elevation file of storage altitude data according to longitude, its object is to make file size gap less big, be conducive to improving Retrieval and extraction rate.
Elevation file described in the present embodiment is the file of the regional altitude data of storage one.Area described here refers to It is to be divided into the area of several strips, projection side by longitudinal or latitude direction through the earth surface of map projection Formula uses isometric projection.The present embodiment will be placed on an elevation file along the block that longitudinal arranges, that is, high at one Store the altitude data of block between two warps in journey file, and between two warps, block is called " regional ", will store two Between bar warp, the elevation file of block altitude data is referred to as:Longitude file.The quantity of longitude file presses 2nDetermine, such as:16、 32nd, 64 etc..16 or 32 or 64 deciles will be divided into by longitudinal in the whole world.It should be noted that due to modern elevation Measurement, Main Basiss satellite or the 3D digital photo taken photo by plane combine what actual measurement was formed, and the definition of digital photo is basis Pixel determines, and amount of pixels is typically according to the addressing bit wide 2 in computernDetermine, therefore, it can seek according to computer The size of location bit wide determines the quantity of elevation file, rather than the degree of longitude and latitude according to conventional segmentation spherical, minute, second divide Regional document.Prove such division in practice, in hgher efficiency, convenient to Computing and program composition, permissible The data storage in plot is read in which file required for more easily finding.It is of course also possible to the list according to degree every minute and second Position divides the number of longitude file, but needs more complicated conversion, takies more calculation resources, and has little significance.
Data compression process module:If for included area in each elevation file is divided into by latitude and longitude Dry less longitudinal arrangement and transversely arranged plot, for the corresponding generation of each elevation file, one is compressed elevation file, raw Become in compression elevation file processes and compression process is made to the original altitude data in each plot.Data compression process module bag Include:Parcel division submodule, a reference value acquisition submodule, species divides submodule, data block sub-module stored.
Parcel division submodule:Foregoing altitude data division module sets up longitude file simply by global subregion The first step, is also further divided into region the area of strip, then regional is sub-divided into plot.The present embodiment is by strip " region " is divided on the ground of shape.If the longitude area of the strip being divided with warp it is necessary to parallel by the warp of strip Degree regional classification is segmented into region.If the latitude of the strip being divided with parallel it is necessary to draw the latitude strip with warp Degree local protectionism is region.Again regional is divided in " plot " in length and breadth, altitude data is stored as " data block " by plot.Area The quantity of domain data block equally can be according to 2nQuantity determine, for example can by a regional classification be 32 or 64 or 128 regions of person, then region division is 32 or 64 or 128 plot.Data block arrangement form data block in length and breadth Matrix.This module is also that each elevation file is corresponding simultaneously generates a compression elevation file, the compression elevation file of generation Content divides submodule by a reference value acquisition submodule, species, and data block sub-module stored produces and writes.A reference value obtains son Module:For calculating the original altitude data in plot, take minimum of a value as a reference value.If directly storing all of high number of passes According to then data value may be very big, takies more byte.The present embodiment is then by the way of difference storage:First at one Find minimum of a value in the original altitude data in plot, on the basis of this minimum of a value be worth, by the original altitude data value in plot with A reference value compares, and obtains difference.In other words, all original altitude data values are a reference value and difference sum.The usual feelings of a reference value Minimum of a value in a data block under condition that is to say, that difference be all on the occasion of.Saved differences are advantageous in that, according to elevation The research of data finds, in a block, the difference majority of altitude data is all smaller, and larger difference only accounts for very small part. Difference is little, and the byte taking is less, as long as so storing an a reference value it is possible to by data all in whole data block The storage demand of value reduces many, is effectively reduced the shared space of storage.
Species divides submodule:For the height value in original altitude data is compared with a reference value, obtain height value with Difference between a reference value, using the maximum of all differences in this plot as the maximum difference in this plot, according to maximum difference be This plot determines the species value of a Difference Storage.Reduce the space that storage takies for improving storage speed, only with difference Not enough, the present embodiment additionally uses the mode of classification storage for storage:Difference is poor by the maximum of all differences in a plot The size of value is divided into several classes, the plot of each class, and all differences in this plot store according to identical byte length;Maximum difference Different plot stores the difference in this plot with different byte lengths, saves memory space with this.
Data block sub-module stored:For data block is pressed following form storage:
Species value, takies a byte;A reference value, takies two bytes;Difference, difference be difference according to species value by Different data length storages, the byte number shared by difference according to the size variation of the species value of Difference Storage, samely Each difference of block takies same byte number storage;Difference is advantageous in that and can be saved by different byte length storages Memory space.Because with the change of earth surface landform, the fluctuating quantity of height simultaneously differs, such as north America region large area Plain and China central and west regions hilly country, the former fluctuating quantity very little, the span of difference may be at 2,3 meters Within, and the fluctuating of the latter is relatively large, the span of difference can exceed that tens meters.If not classifying and adopting each Difference is all stored with identical byte length, and for guaranteeing to store the upper limit of lower difference numerical value, that means that needs to choose The byte length of the maximum difference of numerical value, as storage byte length, is used so long for the flat-bottomed land similar to the former Byte storing, then most storage position is zero, wastes substantial amounts of memory space.
Module set up in index:Each compression elevation file is set up with two-stage index, the first order index of described two-stage index For pointer, described pointer points to the initial address of the second level index in a file or a row plot, and the of described two-stage index Secondary index is the storage address in this compression elevation file for the altitude data in this plot;For quickly from compression elevation file In find data block, this step defines the two-stage index to data block.The compression elevation file set up by the present embodiment It is with the region through wire cutting, is the equal of a file, so the pointer of first order index is the equal of to point to a row The secondary index in plot, and second level index is then data block after the compression address in compression elevation file, that is, phase Side-play amount for file header.
Optimiged index module:For the altitude data storage address in the plot of all for height value invalid values is modified to- 1, the height value by plot whole in a row is all that the one-level index point of invalid value is modified to -1;For global high number of passes According to feature the most prominent is exactly to there is the ocean area that a large amount of elevations are invalid value, excludes these when storing altitude data no The data of valid value is effectively to reduce one of approach of data volume storage.Present embodiments provide a highly effective side for this Formula:The plot that whole altitude datas are all invalid values is indexed with -1 it is not necessary to be stored with real data block, that is, Say and only indexed with one for the altitude data storing single one thalassocraton(Its value is -1)That's all.When in region When the secondary index in all plot in one row is all -1, the one-level index point of this row is defined as -1, no Re-record the index in all plot in this row, simultaneously also without real altitude data block.Getting well of do so is in In the capacity that can substantially reduce altitude data storage, also reduce the capacity of index data simultaneously, and with thalassocraton Connected quantity increase, the effect of reduction becomes apparent from;Also speed up the speed reading altitude data simultaneously.Because if being intended to The altitude data reading is located at ocean, only reads index information and can show it is not necessary to further retrieve and receive data According to directly output elevation is just permissible for the data of invalid value.
Finally, for each compression, elevation file is corresponding sets up a two-stage index file, specially stores two-stage index Information.
Terrain elevation data reading device includes:Compression elevation file extraction module, one-level index search module, two grades of ropes Draw searching modul, original altitude data recovery module, data outputting module, wherein:
Compression elevation file extraction module:For corresponding compression elevation literary composition is found according to the position of altitude data to be searched Part;The altitude data of one place to be extracted, will point out the longitude and latitude in this place under normal circumstances, in the present embodiment, according to Longitude finds compression elevation file.
One-level index search module:The file being located for reading position or the one-level index in a row plot, judge Whether the value of this one-level index is " -1 ", if "Yes", by the value of this file or all altitude datas in all plot of row It is set to default value, and submits to data outputting module to export, if "No", secondary index is carried out by secondary index searching modul Read and search;
Secondary index searching modul:For the secondary index in reading position place plot, judge that whether this secondary index is " -1 ", if "Yes", the value of all for this plot altitude datas is set to default value, and submits to data outputting module to export, if "No" then carries out altitude data recovery by original altitude data recovery module;
Two above module quickly reads and has recovered the altitude data in ocean area, rapidly enters land altitude data Extraction, with this simplify read data process, improve read data speed.Default value herein, is usually arranged as one The value of slightly less than global effectively land elevation, such as -200 meters ~ -500 meters.The present embodiment default value is set to -250 meters, this Value is also actually the invalid elevation that height value is this position mark during invalid value, and such elevation is the ocean area of invalid value Land elevation will will not impact to display result under the water surface.
Original altitude data recovery module is used for from compression elevation file, reads and recover the original high number of passes in this plot According to.Original altitude data recovery module includes again:Altitude data storage location searches submodule, species reading submodule, benchmark Value reading submodule, difference reading submodule, original altitude data calculating sub module.Wherein:
Altitude data storage location searches submodule:For the address according to secondary index, find this plot altitude data The storage location being located in this compression elevation file;
Species reading submodule:For reading this plot altitude data species value, obtain the storage mode of difference;
A reference value reading submodule:For reading a reference value;
Difference reading submodule:Read difference data for the storage mode according to difference;In the present embodiment, difference Storage mode is:Maximum difference according to this plot divides:Maximum difference is divided into more than 255, more than 15 and is less than or equal to 255th, it is more than zero and less than or equal to 15, null four species, the species value defining Difference Storage respectively is ZL1, ZL2, ZL3, ZL4;The storage mode of the difference of described four species is:All differences in the plot that species value is ZL1 adopt 16bit storage, all differences in the plot being ZL2 by species value adopt 8bit storage, by species value, the plot for ZL3 is all Difference adopts 4bit to store, and all differences in the plot being ZL4 for species value then do not store.So corresponding reading when reading Each elevation difference will be recovered by mode according to writing mode during unit, as:Every 16 bit of ZL1 read as a difference Take, every 8 bit of ZL2 read as a difference, every 4 bit of ZL3 read as a difference, and all of difference is put by ZL4 For 0;
Original altitude data calculating sub module:For by a reference value and difference value, obtaining original altitude data;
Data outputting module:For the altitude data recovering is exported.In fact, when one-level indexes as -1, this mould All altitude datas that block directly exports this row plot are -250 meters of invalid value, when secondary index is -1, this module The all altitude datas directly exporting current plot are -250 meters of invalid value.Only one-level indexes with secondary index not When being -1, the just real actual elevation according to each point of a reference value and mathematic interpolation(I.e. original elevation)And export.From the foregoing, it will be observed that Altitude data herein can be calculate after the original altitude data that the recovers or information for -1 is direct according to index The invalid value of filling.
Illustrate that the present embodiment uses the advantage of difference with two specific examples below:
Citing 1:
Fig. 2 is the original altitude data matrix in longitude and latitude plot near 55.77473,101.584557, and height above sea level is all At 3000 meters about, if storing original altitude data, each data must use 16bit data storage.
Fig. 3 is then the difference data matrix obtaining by seeking difference, and its a reference value is 3330.In a matrix it can be seen that The data of each node is no more than 255, so, this data can be by one master data 3330 of storage and a series of 8bit altitude data come to complete store, memory data output be initial data 50% about.
Citing 2:
Fig. 4 is the original altitude data matrix in a plot, and majority elevation therein is all higher than 16m, and minimum height value is 23m.
Fig. 5 is the altitude data matrix through mathematic interpolation, and wherein data is respectively less than 15, and this data block can use 4 digits According to storage.
Because earth's surface has substantial amounts of Plain, or plateau, so, for a regional area, drop is less than 255 meter areas A lot, so, more than half can be reduced data storage capacity by this mode.
Embodiment two:
The present embodiment is the improvement of embodiment one, is the division with regard to longitude file, region data block for the embodiment one Refinement.Longitude file described in the present embodiment is 32, arranges 1024 horizontal regions, a region in a longitude file Inside it is divided into 32 data blocks.After such division, the precision span of the data of each longitude document memory storage is:360/32 =11.25, first file stores 11.25 ° of regional altitude datas of 0 ° ~ east longitude of east longitude, and second file stores 11.25 ° of east longitude 22.50 ° of regional altitude datas of ~ east longitude, remaining is by that analogy.If that we need to read 110 ° of regional elevations of east longitude Data, very easily can obtain 110/11.25=9.7778 from above-mentioned analysis, take 9.778 integer part it is possible to obtain The altitude data of this area is stored in 9+1=10, namely in the tenth longitude file.The tenth file so can be directly read In data.In the tenth file, the mode reading respective data blocks is similar.Thus can be simple by one Algorithm directly find required for the position of reading store in which compression elevation file, be which horizontal region, be Which plot in this region.
Embodiment three:
The present embodiment is the improvement of above-described embodiment, is the refinement that above-described embodiment divides with regard to difference species.This enforcement This plot maximum difference described in example is divided into more than 255, is less than or equal to 255 more than 15, is less than or equal to 15 more than zero, is equal to Zero four species, define species value ZL1, ZL2, ZL3, ZL4, the addressing space storage side of the difference of described four species respectively Formula is:By maximum difference be more than 255 ZL1 plot all differences adopt 16 storage, by maximum difference be more than 15 be less than or All differences in the ZL2 plot equal to 255 adopt 8 storages, maximum difference are more than zero less than or equal to 15 ZL3 plot All differences adopt 4 storages, and all differences for maximum difference null ZL4 plot then do not store.This division Benefit is that obtained number of species is not a lot, it is possible to reduce distinguish the complexity that variety classes reads, meanwhile, according to 16bit(2 bytes), 8bit(1 byte), 4bit(0.5 byte)Do not store four kinds of modes and store and read difference data, energy The byte length of preferable align data file, can save the memory space of each type again to greatest extent.
Species value has various definitions mode, for example, divide according to the maximum difference in this plot:Maximum difference is divided into and being more than 255th, be more than 15 and less than or equal to 255, more than 4 and less than or equal to 15, more than 0 and less than or equal to 4, null Five species, the species value defining Difference Storage respectively is ZZL1, ZZL2, ZZL3, ZZL4, ZZL5;The difference of described five species The storage mode of value is:All differences in the plot that species value is ZZL1 adopt 16bit storage, are the ground of ZZL2 by species value All differences of block adopt 8bit storage, by species value, all differences in the plot for ZZL3 adopt 4bit to store, for species The all differences being worth the plot for ZZL4 adopt 2bit to store, and all differences in the plot being ZZL5 for species value are not then stored up Deposit.Certain space so can be saved further, but because the plot less than 4 meters for the maximum difference is few, this division is actual The effect of the saving memory space producing is little.
Example IV:
The present embodiment is the improvement of above-described embodiment, is the refinement with regard to index file storage mode for the above-described embodiment.Right In each compression, elevation file is corresponding sets up a two-stage index file, special storage two-stage index information.This index file Filename identical with the filename first half of compression elevation file, only suffix name is different, so can be with embodiment one Search the mode of compression elevation file, easily calculate the corresponding index information in certain position in which index file.
As a kind of mode of optimization, can also be by all two-stage index information Stores of whole altitude data various pieces In same special index file, at this moment need to remove the lookup algorithm of index of definition according to the structure of index;
The mode alternatively optimizing, the corresponding two-stage index for each part can be with the compression after processing Altitude data can also be stored in same compression elevation file, and index information both can be stored in the beginning of compression elevation file Part, can also be attached to the end of compression elevation file.Under normal circumstances, it is more highly preferred to before being stored in altitude data Storage method, in this case, when needing the altitude data storage after generating compression, compresses elevation file at each in advance The memory space of front reserved index information.
Finally it should be noted that above only in order to technical scheme to be described and unrestricted, although with reference to preferable cloth Scheme of putting has been described in detail to the present invention, it will be understood by those within the art that, can be to the technology of the present invention Scheme(The dividing mode in such as area, region and plot, the occupation mode of addressing space, the rank of index, maximum difference species Different demarcation mode, byte length during multiple Difference Storage etc.)Modify or equivalent, without deviating from the present invention The spirit and scope of technical scheme.Method of the present invention can work out the program for being applied to computer system, and runs on In computer network system of the present invention.

Claims (6)

1. a kind of device of terrain elevation data storage is it is characterised in that described device includes:Altitude data division module, number According to compressing processing module, index and set up module, optimiged index module, wherein:
Altitude data division module:For original altitude data is divided into one or more parts by different regions, by each Part is stored as an elevation file;Data compression process resume module submitted to by original elevation file for each part, And module foundation index is set up by index, optimiged index is completed by optimiged index module and processes;
Data compression process module:For included area in each elevation file is divided into several by latitude and longitude Less longitudinal arrangement and transversely arranged plot, generate a compression elevation file for each elevation file is corresponding, generate pressure In contracting elevation file processes, the original altitude data in each plot is compressed processing and stores, data compression process module bag Include:Parcel division submodule, a reference value acquisition submodule, species division submodule, data block sub-module stored, wherein:
Parcel division submodule:Included area in each elevation file is divided into several by latitude and longitude less Longitudinal arrangement and transversely arranged plot, send following three submodule to process the original altitude data in each plot;
A reference value acquisition submodule:For compare and calculate this plot each point original altitude data, take minimum of a value as base Quasi- value;
Species divides submodule:For comparing the height value of each point in original for this plot altitude data with a reference value, calculate Difference between the height value and a reference value of each point, the maximum of all differences in this plot is maximum poor as this plot Value, determines the species value of a Difference Storage according to maximum difference for this plot;
Data block sub-module stored:For this plot altitude data is stored in compression elevation file by following form:
Species value, takies a byte;A reference value, takies two bytes;Difference, difference is difference according to species value by difference Data length storage, the byte number shared by difference according to the size variation of the species value of Difference Storage, same plot Each difference takies same byte number storage;
Module set up in index:Two-stage index is set up to each compression elevation file, the first order of described two-stage index indexes as referring to Pin, described pointer points to the initial address of the second level index in a file or a row plot, the second level of described two-stage index Index altitude data for this plot storage address in this compression elevation file;
Optimiged index module:For the altitude data storage address in the plot of all for height value invalid values is modified to -1, will In one file or a row, the height value in whole plot is all that the one-level index point of invalid value is modified to -1;
Described elevation file by drawing the regional altitude data through map projection according to longitudinal or latitude direction It is divided into several pieces to obtain, each of which part corresponds to an elevation file;
It is characterized in that,
Described maximum difference be divided into more than 255, more than 15 and less than or equal to 255, more than zero and less than or equal to 15, Null four species, the species value defining Difference Storage respectively is ZL1, ZL2, ZL3, ZL4;The difference of described four species Storage mode be:All differences in the plot that species value is ZL1 adopt 16bit to store, the plot for ZL2 by species value All differences adopt 8bit storage, by species value, all differences in the plot for ZL3 adopt 4bit to store, and for species value are All differences in the plot of ZL4 then do not store.
2. device according to claim 1, it is characterised in that described division, is according to 2nQuantity determines.
3. device according to claim 1 is it is characterised in that the altitude data after described index and process is stored in and carries In the compression elevation file of index.
4. device according to claim 1 is it is characterised in that the altitude data after described index and process stores respectively In indexed file and compression elevation file.
5. device according to claim 4 is it is characterised in that the two-stage index of described whole altitude data various pieces Information Store is in master index file.
6. a kind of read the device of terrain elevation data that storage device described in claim 1 stored it is characterised in that described Device include:Compression elevation file extraction module, one-level index search module, secondary index searching modul, original high number of passes According to recovery module, data outputting module, wherein:
Compression elevation file extraction module:For corresponding compression elevation file is found according to the position of altitude data to be searched;
One-level index search module:For reading position be located a file or a row plot one-level index, judge this one Whether the value of level index is " -1 ", if "Yes", the value of this file or all altitude datas in all plot of row is set to Default value, and submit to data outputting module to export, if "No", carried out the reading of secondary index by secondary index searching modul Search;
Secondary index searching modul:For the secondary index in reading position place plot, judge whether this secondary index is " -1 ", If "Yes", the value of all for this plot altitude datas is set to default value, and submits to data outputting module to export, if "No" Then altitude data recovery is carried out by original altitude data recovery module;
Original altitude data recovery module is used for from compression elevation file, reads and recover the original altitude data in this plot, Original altitude data recovery module includes again:Altitude data storage location searches submodule, species reading submodule, a reference value reading Take submodule, difference reading submodule, original altitude data calculating sub module, wherein:
Altitude data storage location searches submodule:For the address according to secondary index, find this plot altitude data at this The storage location being located in compression elevation file;
Species reading submodule:For reading this plot altitude data species value, obtain the storage mode of difference;
A reference value reading submodule:For reading a reference value;
Difference reading submodule:Read difference data for the storage mode according to difference;
Original altitude data calculating sub module:For by a reference value and difference value, obtaining original altitude data;
Data outputting module:For the altitude data recovering is exported.
CN201310720760.5A 2013-12-24 2013-12-24 Device for storing altitude data of terrain and device for reading altitude data of terrain Active CN103678658B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310720760.5A CN103678658B (en) 2013-12-24 2013-12-24 Device for storing altitude data of terrain and device for reading altitude data of terrain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310720760.5A CN103678658B (en) 2013-12-24 2013-12-24 Device for storing altitude data of terrain and device for reading altitude data of terrain

Publications (2)

Publication Number Publication Date
CN103678658A CN103678658A (en) 2014-03-26
CN103678658B true CN103678658B (en) 2017-02-15

Family

ID=50316202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310720760.5A Active CN103678658B (en) 2013-12-24 2013-12-24 Device for storing altitude data of terrain and device for reading altitude data of terrain

Country Status (1)

Country Link
CN (1) CN103678658B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108052629B (en) * 2017-12-19 2021-07-06 郑州师范学院 Rapid sea and land judgment method based on high-precision DEM data
CN108829703A (en) * 2018-04-28 2018-11-16 尚谷科技(天津)有限公司 A kind of processing method of the remote sensing elevation data based on multi-source tree graph structure
CN110716997B (en) * 2019-04-24 2022-02-08 中国科学院地理科学与资源研究所 Target address gradient data acquisition method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103600A (en) * 2009-12-16 2011-06-22 ***通信集团公司 Map building method and map system
CN102364522A (en) * 2011-10-24 2012-02-29 中国地质大学(武汉) Large-scale weather volume data drawing method based on global division

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103600A (en) * 2009-12-16 2011-06-22 ***通信集团公司 Map building method and map system
CN102364522A (en) * 2011-10-24 2012-02-29 中国地质大学(武汉) Large-scale weather volume data drawing method based on global division

Also Published As

Publication number Publication date
CN103678658A (en) 2014-03-26

Similar Documents

Publication Publication Date Title
CN103678657B (en) Method for storing and reading altitude data of terrain
CN104765876B (en) Magnanimity GNSS small documents cloud storage methods
CN111782742B (en) Large-scale geographic space data oriented storage and retrieval method and system thereof
CN109635068A (en) Mass remote sensing data high-efficiency tissue and method for quickly retrieving under cloud computing environment
CN110232394A (en) A kind of multi-scale image semantic segmentation method
KR100903961B1 (en) Indexing And Searching Method For High-Demensional Data Using Signature File And The System Thereof
CN104376053A (en) Storage and retrieval method based on massive meteorological data
CN101459901B (en) Vector map data transmission method based on multi-stage slicing mode
Qian et al. Spatial–temporal analyses of surface coal mining dominated land degradation in Holingol, Inner Mongolia
Xiong et al. Drainage basin object-based method for regional-scale landform classification: A case study of loess area in China
CN103678658B (en) Device for storing altitude data of terrain and device for reading altitude data of terrain
CN104142946A (en) Method and system for aggregating and searching service objects of same type
CN102855322A (en) Map data storage method based on space exploration technology
CN110659369B (en) On-orbit high-precision lightweight global image control point database construction method and system
CN103970842A (en) Water conservancy big data access system and method for field of flood control and disaster reduction
CN103440350A (en) Three-dimensional data search method and device based on octree
CN110187383A (en) A kind of quick method for separating of sea wide-azimuth seismic data COV trace gather
CN106156281A (en) Arest neighbors point set method for quickly retrieving based on Hash Cube spatial level partition structure
CN115269893A (en) Lake and bin integrated remote sensing image storage system and method
CN104331870A (en) Structured multi-scale reconstruction method suitable for regular grid DEM
CN104156475B (en) Geography information read method and device
CN104699701A (en) Parallel nearest node computing method and distributed system based on sensitive hashing
CN110046265A (en) A kind of subgraph query method based on bilayer index
CN109947884A (en) A kind of high-efficiency tissue querying method of whole world ICESat/GLAS point cloud
CN106682237A (en) Mountain boundary automatic extracting method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant