CN102902712A - Writing-in method and device, reading method and device for grid factor data - Google Patents

Writing-in method and device, reading method and device for grid factor data Download PDF

Info

Publication number
CN102902712A
CN102902712A CN2012102876266A CN201210287626A CN102902712A CN 102902712 A CN102902712 A CN 102902712A CN 2012102876266 A CN2012102876266 A CN 2012102876266A CN 201210287626 A CN201210287626 A CN 201210287626A CN 102902712 A CN102902712 A CN 102902712A
Authority
CN
China
Prior art keywords
grid factor
value
grid
factor data
unit
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
Application number
CN2012102876266A
Other languages
Chinese (zh)
Other versions
CN102902712B (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 Datum Science & Technology Development Co Ltd
Original Assignee
Beijing Datum Science & Technology Development Co Ltd
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 Datum Science & Technology Development Co Ltd filed Critical Beijing Datum Science & Technology Development Co Ltd
Priority to CN201210287626.6A priority Critical patent/CN102902712B/en
Publication of CN102902712A publication Critical patent/CN102902712A/en
Application granted granted Critical
Publication of CN102902712B publication Critical patent/CN102902712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a writing-in method and a device, a reading method and a device for grid factor data. The writing-in method for grid factor data includes the following steps: S101, obtaining initial grid factor data; S102, extracting values of three continuous grid factor units; S103, determining whether five digits exist after the decimal point of each value of the grid factor units, if exist, performing S105, if not, performing S104; S104, processing the digit number after the decimal point of each grid factor unit to be five; S105, sequentially arranging the digits after the decimal point of the three continuous grid factor units to form a double-precision figure with 15 digits after the decimal point; S106, determining whether the traversal is finished, if yes, performing S107, if no, returning to the S102; and S107, organizing the double-precision figure into target grid factor data and writing in the target grid factor data. According to the methods and the devices, storing and transmitting efficiencies of the grid factor data and the computing performance can be improved.

Description

The method that the grid factor data writes and device, the method that reads and device
Technical field
The application relates to the technical field that the grid factor data is processed, particularly relate to a kind of wiring method of grid factor data, a kind of writing station of grid factor data, a kind of read method of grid factor data, and, a kind of reading device of grid factor data.
Background technology
Raster data is described position and the value of the space phenomenon characteristic corresponding with each grid cell position with a regular grids.Reflect in the variation of the conceptive space phenomenon variation by the grid cell value.Many data all represent with grid format in GIS (Geographic Information System, the Geographic Information System) system.The raster data model is also referred to as grid (Grid), grating map, surface coverage (Surface Cover) or image in generalized information system.Grid is comprised of row, column, grid cell.Row, column is initial by the grid upper left corner.In two-dimensional coordinate system, go as y coordinate, row as the x coordinate.Somewhat similar as the x coordinate as y coordinate, longitude with latitude in this.
Raster data is with single grid cell representative point, represent line, represent face in abutting connection with the set of grid with a series of adjacent cells unit.Each grid cell in the grid has value, integer or a floating type.Integer grid cell value represents categorical data usually.Such as, land type commonly used 1 represents urban land, 2 and represents forest land etc.Floating type grid cell value often represents continuous data, such as, quantity of precipitation model the precipitation values such as 20,15,12,23 may be arranged.The floating type grid needs more Computer Storage resource than integer grid, and this relates to the key factor that large-scale generalized information system project must be considered.
Suppose that raster data is comprised of the capable N row of a M grid cell, each grid cell is stored the floating type data.If use commonsense method, each grid cell is stored with 4 bytes, then needs M*N*4 byte, and required like this storage space is very large, this storage to system, performance, and the transfer efficiency of network all requires very high.
Because data volume is huge in the systems such as GIS, stores the required storage space of this floating type grid factor data quite huge, the resource cost that transmits this floating type grid factor data is large, and the computing treatment effeciency of system is low.How reducing the required storage space of floating type grid factor data, improve the storage of floating type grid factor data and the efficient of transmitting, improve calculated performance, is to need at present the urgent technical matters that solves of those skilled in the art.
Summary of the invention
The application's technical matters to be solved provides method and the device that a kind of grid factor data writes, the method that the grid factor data reads and device, in order to reduce the required storage space of raster data, improve the storage of floating type grid factor data and the efficient of transmitting, improve calculated performance.
In order to address the above problem, the application discloses the method that a kind of grid factor data writes, and comprising:
Step S101 obtains original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1;
Step S102 extracts the value of 3 continuous grid factor units successively from described M*N grid factor unit;
Step S103 judges whether the figure place behind the value radix point of described 3 continuous grid factor units is 5, if then execution in step 105; If not, execution in step S104 then;
Step S104 is treated to 5 with the figure place behind the value radix point of described grid factor unit;
Step S105, with the digital arranged in sequence behind the value radix point of described 3 continuous grid factor datas, forming behind the radix point is 15 double number;
Step S106 judges whether to have traveled through described M*N grid factor unit, if, execution in step S107 then; If not, then return step S102;
Step S107 is woven to target grid factor data with described double array, writes described target grid factor data.
Preferably, after described step S102, also comprise the steps:
If from described M*N grid factor unit, extract continuously grid factor unit of 3-K, then replenish K the First Eigenvalue, wherein, described K is greater than 0 and less than 3 positive integer.
Preferably, described step S104 comprises:
If the figure place behind the value radix point of described grid factor unit, is then given up the numeral behind 5 of the value radix point of grid factor unit greater than 5;
If the figure place behind the value radix point of described grid factor unit is less than 5, then after the value of grid factor unit, replenish Second Eigenvalue, making the figure place behind the radix point is 5.
Preferably, described method also comprises:
When the value of described grid factor unit is 1, this value is replaced with 0.99999;
When the value of described grid factor unit is 0, this value is replaced with 0.00000.
The embodiment of the present application also discloses the device that a kind of grid factor data writes, and comprising:
Original grid factor data acquisition module is used for obtaining original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1;
The value extraction module of grid factor unit is for the value of extracting successively 3 continuous grid factor units from described M*N grid factor unit;
Whether the figure place judge module is 5 for the figure place behind the value radix point of judging described 3 continuous grid factor units, if then invocation target grid factor data forms module; If not, then call the figure place processing module;
The figure place processing module is used for the figure place behind the value radix point of described grid factor unit is treated to 5;
Target grid factor data forms module, is used for the digital arranged in sequence behind the value radix point of described 3 continuous grid factor datas, and forming behind the radix point is 15 double number;
Judge module is used for judging whether to have traveled through described M*N grid factor unit, if, invocation target grid factor data writing module then; If not, then return the value extraction module of grid factor unit;
Target grid factor data writing module is used for described double array is woven to target grid factor data, writes described target grid factor data.
Preferably, after the value extraction module of described grid factor unit, also comprise such as lower module:
Complementary module, if be used for extracting 3-K continuously grid factor unit from described M*N grid factor unit, additional K the First Eigenvalue then, wherein, described K is greater than 0 and less than 3 positive integer.
Preferably, described figure place processing module comprises:
Give up submodule, if be used for figure place behind the value radix point of described grid factor unit greater than 5, then give up the numeral behind 5 of the value radix point of grid factor unit;
Replenish submodule, if be used for figure place behind the value radix point of described grid factor unit less than 5, then replenish Second Eigenvalue after the value of grid factor unit, making the figure place behind the radix point is 5.
Preferably, described device also comprises:
The first replacement module, the value that is used at described grid factor unit is 1 o'clock, and this value is replaced with 0.99999;
The second replacement module, the value that is used at described grid factor unit is 0 o'clock, and this value is replaced with 0.00000.
The embodiment of the present application also discloses the method that a kind of grid factor data reads, and comprising:
Step S201 reads target grid factor data; Wherein, described target grid factor data is that 15 double array becomes after by radix point;
Step S202 resolves the value of the grid factor unit in the target grid factor data successively, and the numeral behind the target grid factor data radix point is divided into 3 groups according to the order of sequence, and 5 every group, forming behind the radix point is the value of 3 continuous grid factor units of 5.
Step S203 judges whether to have traveled through described target grid factor data, if, execution in step S204 then; If not, then return step S202;
Step S204 organizes the value of described grid factor unit according to the order of sequence, obtains original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1.
The embodiment of the present application also discloses the device that a kind of grid factor data reads, and comprising:
Target grid factor data read module is used for reading target grid factor data; Wherein, described target grid factor data is that 15 double array becomes after by radix point;
Target grid factor data parsing module, be used for resolving successively the value of the grid factor unit of target grid factor data, numeral behind the target grid factor data radix point is divided into 3 groups according to the order of sequence, and 5 every group is the value of 3 continuous grid factor units of 5 behind the formation radix point.
The Ergodic judgement module is used for judging whether to have traveled through described target grid factor data, if then call original grid factor data acquisition module; If not, then return target grid factor data parsing module;
Original grid factor data acquisition module, the value for organizing according to the order of sequence described grid factor unit obtains original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1.
Compared with prior art, the application comprises following advantage:
The application is distributed in grid factor data between 0 to 1 for the value of grid factor unit, original grid factor data is extracted 3 continuous grid factor units successively, double number with 8 bytes substitutes, save like this storage space of grid factor data, the performance of Effective Raise system.
Particularly, the embodiment of the present application can substitute 3 continuous grid factor units in the original grid factor unit with the double number of 8 bytes, in this case, originally needed the grid factor data of 34 bytes, can store with 8 bytes, like this, when carrying out the raster data backup, can with the same information of resource storage still less, take full advantage of storage space.In addition, because the minimizing of storage space, the application can also improve the storage of floating type grid factor data and the efficient of transmitting, and improves calculated performance.
Description of drawings
Fig. 1 is the flow chart of steps of the embodiment of the method that writes of a kind of grid factor data of the application;
Fig. 2 is the flow chart of steps of the embodiment of the method that reads of a kind of grid factor data of the application;
Fig. 3 is the structured flowchart of the device embodiment that writes of a kind of grid factor data of the application;
Fig. 4 is the structured flowchart of the device embodiment that reads of a kind of grid factor data of the application.
Embodiment
For above-mentioned purpose, the feature and advantage that make the application can become apparent more, below in conjunction with the drawings and specific embodiments the application is described in further detail.
One of core idea of the application is, all be stored in grid factor data between 0 to 1 for data, original grid factor data is extracted successively the value of 3 continuous grid factor units, substitute with the double number that behind the radix point is 15, like this, the grid factor data that originally needed 34 byte floating type numbers storages only needs the double number of 8 bytes to store now, has greatly saved storage space.
With reference to Fig. 1, show the flow chart of steps of the embodiment of the method that a kind of grid factor data of the application writes, specifically can comprise with following steps:
Step S101 obtains original grid factor data;
Wherein, described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1.
In generalized information system, there is a class raster data to be prevalent in the computing of system, usually serve as the role of design factor or the factor, value is referred to as " grid factor data " between 0 to 1.Original grid factor data in the embodiment of the present application, the value that namely refers to this its grid factor unit is " the grid factor data " of the floating type number between 0 to 1, be described original grid factor data grid factor unit storage be the floating point type number, and span is between 0 to 1.
Step S102 extracts the value of 3 continuous grid factor units successively from described M*N grid factor unit;
Suppose that the embodiment of the present application is based on 32 machines, the floating type number accounts for 4 bytes of storage space, and the double number accounts for 8 bytes of storage space.The storage means that the application proposes is that to the grid factor data, from first grid factor unit, continuous 3 grid factor units are processed object as one.
Step S103 judges whether the figure place behind the value radix point of described 3 continuous grid factor units is 5, if then execution in step 105; If not, execution in step S104 then;
Step S104 is treated to 5 with the figure place behind the value radix point of described grid factor unit;
In a preferred embodiment of the present application, described step S104 is further comprising the steps:
Substep S11 is if the figure place behind the value radix point of described grid factor unit, is then given up the numeral behind 5 of the value radix point of grid factor unit greater than 5;
Substep S12, if the figure place behind the value radix point of described grid factor unit less than 5, is then replenished Second Eigenvalue after the value of grid factor unit, making the figure place behind the radix point is 5.
For example, described Second Eigenvalue can be got 0 value, when the value of 3 continuous grid factor units that extract is respectively 0.12345,0.6789,0.0123456, is 5 after the value of each grid factor unit is converted to radix point.Wherein, for 0.12345, because the figure place behind the radix point just is 5, then do not need to process, for 0.6789, because the figure place behind the radix point is less than 5, then mend in the back Second Eigenvalue 0, making the figure place behind the radix point is 5, namely is rewritten as 0.67890, for 0.0123456, because the figure place behind the radix point is greater than 5, then by abandoning the numeral behind 5 of the radix point, making the figure place behind the radix point is 5, namely is rewritten as 0.01234.By above-mentioned steps, obtaining behind 3 radix point is that the value of 5 grid factor unit is 0.12345,0.67890,0.01234.
In a preferred embodiment of the present application, described method can also comprise the steps:
When the value of grid factor unit is 1, this value is replaced with 0.99999;
When the value of grid factor unit is 0, this value is replaced with 0.00000.
By the integer number is replaced with the floating type number, be convenient to use the embodiment of the present application and carry out computing.
Step S105, with the digital arranged in sequence behind the value radix point of described 3 continuous grid factor datas, forming behind the radix point is 15 double number;
All be rewritten into 5 figure places behind the radix point by the floating type number with grid factor unit storage, obtain like this 3 continuous revised numbers, again these 3 revised strings are joined, form a double number, this number has 15 figure places behind radix point, substitute 3 original floating type numbers with this double-precision quantity and store.
For example, when the figure place behind the value radix point of 3 continuous grid factor datas was treated to 5, the value of the grid factor unit of gained was 0.12345,0.67890,0.01234 the arranged in sequence the data obtained is that 15 double number is 0.123456789001234 behind the radix point that obtains.Like this, originally need the floating type grid factor data of 34 bytes store, and can store with the double number of 8 bytes now, when carrying out the backup of grid factor data, can fully save storage space.
Step S106 judges whether to have traveled through described M*N grid factor unit, if, execution in step S107 then; If not, then return step S102;
In specific implementation, if when from the grid factor unit, extracting the continuous grid factor unit of 3 of less thaies, then add to 3 continuous grid factor units with the First Eigenvalue.In this case, the embodiment of the present application can also may further comprise the steps:
If from described M*N grid factor unit, extract continuously grid factor unit of 3-K, then replenish K the First Eigenvalue, wherein, described K is greater than 0 and less than 3 positive integer.
To M*N grid factor unit of grid factor data, take continuous 3 grid factor units as a processing object, the complete all grid factor units of sequential processes.If remaining 1 or 2 grid factor units then with neat 3 the grid factor units of 0.0 value complement, form a processing object and process at last.
For example, the First Eigenvalue of getting can value be 0 value, is 0.12345 when extracting 3 grid factor units of less than, 0.6789, then can replenish the grid factor unit of 10 value, 3 continuous grid factor units that replenish at last gained are 0.12345,0.6789,0.
Step S 107, and described double array is woven to target grid factor data, write described target grid factor data.
With reference to Fig. 2, show the flow chart of steps of the embodiment of the method that a kind of grid factor data of the application reads, specifically can comprise with following steps:
Step S201 reads target grid factor data; Wherein, described target grid factor data is that 15 double array becomes after by radix point;
Step S202 resolves the value of the grid factor unit in the target grid factor data successively, and the numeral behind the target grid factor data radix point is divided into 3 groups according to the order of sequence, and 5 every group, forming behind the radix point is the value of 3 continuous grid factor units of 5.
In specific implementation, application system reads revised grid factor data from file, and resolves grid factor unit value.The double number of supposing file reading has T, and then the figure place behind the radix point of each double number is 15.This T double is counted processed in sequence, if the double number is 0.abcdefghijklmnp, the numeral behind its radix point is divided into 3 groups according to the order of sequence, every group 5, the value of the grid factor unit of 5 figure places is 0.abcde behind 3 radix point reformulating, 0.fghij, 0.klmnp.
The application can carry out efficient storage to the grid factor data, carry out outside the data backup of grid factor lattice, the application can also assemble efficiently to common grid factor data, can obtain data volume still less, when carrying out Internet Transmission, the reciever of transmission is resolved by the application again, just can obtain original grid factor data.Can save like this 1/3 volume of transmitted data of commonsense method.
Step S203 judges whether to have traveled through described target grid factor data, if, execution in step S204 then; If not, then return step S202;
Step S204 organizes the value of described grid factor unit according to the order of sequence, obtains original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1.
In specific implementation, the assembling that the application does original grid factor data and the data after the assembling are resolved, all be in CPU, can simply carry out fast computing, efficient is very fast, compared with the commonsense method reading and writing of files, Internet Transmission, be not an order of magnitude other, so the application can well improve system performance.
Need to prove, for embodiment of the method, for simple description, therefore it all is expressed as a series of combination of actions, but those skilled in the art should know, the application is not subjected to the restriction of described sequence of movement, because according to the application, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the instructions all belongs to preferred embodiment, and related action and module might not be that the application is necessary.
With reference to Fig. 3, show the structured flowchart of the device embodiment that a kind of grid factor data of the application writes, specifically can comprise with such as lower module:
Original grid factor data acquisition module 401 is used for obtaining original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1;
The value extraction module 402 of grid factor unit is for the value of extracting successively 3 continuous grid factor units from described M*N grid factor unit;
In a preferred embodiment of the present application, after the value extraction module of described grid factor unit, also comprise such as lower module:
Complementary module, if be used for extracting 3-K continuously grid factor unit from described M*N grid factor unit, additional K the First Eigenvalue then, wherein, described K is greater than 0 and less than 3 positive integer.
Whether figure place judge module 403 is 5 for the figure place behind the value radix point of judging described 3 continuous grid factor units, if then invocation target grid factor data forms module; If not, then call the figure place processing module;
Figure place processing module 404 is used for the figure place behind the value radix point of described grid factor unit is treated to 5;
In a preferred embodiment of the present application, described figure place processing module comprises:
Give up submodule, if be used for figure place behind the value radix point of described grid factor unit greater than 5, then give up the numeral behind 5 of the value radix point of grid factor unit;
Replenish submodule, if be used for figure place behind the value radix point of described grid factor unit less than 5, then replenish Second Eigenvalue after the value of grid factor unit, making the figure place behind the radix point is 5.
In a preferred embodiment of the present application, described device can also comprise such as lower module:
The first replacement module, the value that is used at described grid factor unit is 1 o'clock, and this value is replaced with 0.99999;
The second replacement module, the value that is used at described grid factor unit is 0 o'clock, and this value is replaced with 0.00000.
Target grid factor data forms module 405, is used for the digital arranged in sequence behind the value radix point of described 3 continuous grid factor datas, and forming behind the radix point is 15 double number;
Ergodic judgement module 406 is used for judging whether to have traveled through described M*N grid factor unit, if, invocation target grid factor data writing module then; If not, then return the value extraction module of grid factor unit;
Target grid factor data writing module 407 is used for described double array is woven to target grid factor data, writes described target grid factor data.
For device embodiment shown in Figure 3 because itself and embodiment of the method basic simlarity shown in Figure 1, so describe fairly simple, relevant part gets final product referring to the part explanation of embodiment of the method.
With reference to Fig. 4, show the structured flowchart of the device embodiment that a kind of grid factor data of the application reads, specifically can comprise with such as lower module:
Target grid factor data read module 501 is used for reading target grid factor data; Wherein, described target grid factor data is that 15 double array becomes after by radix point;
Target grid factor data parsing module 502, be used for resolving successively the value of the grid factor unit of target grid factor data, numeral behind the target grid factor data radix point is divided into 3 groups according to the order of sequence, and 5 every group is the value of 3 continuous grid factor units of 5 behind the formation radix point.
Ergodic judgement module 503 is used for judging whether to have traveled through described target grid factor data, if then call original grid factor data acquisition module; If not, then return target grid factor data parsing module;
Original grid factor data acquisition module 504, the value for organizing according to the order of sequence described grid factor unit obtains original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1.
For device embodiment shown in Figure 4 because itself and embodiment of the method basic simlarity shown in Figure 2, so describe fairly simple, relevant part gets final product referring to the part explanation of embodiment of the method.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.
Those skilled in the art should understand, the application's embodiment can be provided as method, device or computer program.Therefore, the application can adopt complete hardware implementation example, complete implement software example or in conjunction with the form of the embodiment of software and hardware aspect.And the application can adopt the form of the computer program of implementing in one or more computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) that wherein include computer usable program code.
The application is that reference is described according to process flow diagram and/or the block scheme of method, equipment (system) and the computer program of the embodiment of the present application.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or the block scheme and/or square frame and process flow diagram and/or the block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device producing a machine, so that the instruction of carrying out by the processor of computing machine or other programmable data processing device produces the device that is used for realizing in the function of flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, so that the instruction that is stored in this computer-readable memory produces the manufacture that comprises command device, this command device is realized the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
These computer program instructions also can be loaded on computing machine or other programmable data processing device, so that carry out the sequence of operations step producing computer implemented processing at computing machine or other programmable devices, thereby be provided for realizing the step of the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame in the instruction that computing machine or other programmable devices are carried out.
Although described the application's preferred embodiment, in a single day those skilled in the art get the basic creative concept of cicada, then can make other change and modification to these embodiment.So claims are intended to all changes and the modification that are interpreted as comprising preferred embodiment and fall into the application's scope.
At last, also need to prove, in this article, relational terms such as the first and second grades only is used for an entity or operation are separated with another entity or operational zone, and not necessarily requires or hint and have the relation of any this reality or sequentially between these entities or the operation.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby not only comprise those key elements so that comprise process, method, article or the equipment of a series of key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, article or equipment.In the situation that not more restrictions, the key element that is limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
Method and device that above a kind of grid factor data that the application is provided writes, the method that the grid factor data reads and device, be described in detail, used specific case herein the application's principle and embodiment are set forth, the explanation of above embodiment just is used for helping to understand the application's method and core concept thereof; Simultaneously, for one of ordinary skill in the art, the thought according to the application all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.

Claims (10)

1. the method that the grid factor data writes is characterized in that, comprising:
Step S101 obtains original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1;
Step S102 extracts the value of 3 continuous grid factor units successively from described M*N grid factor unit;
Step S103 judges whether the figure place behind the value radix point of described 3 continuous grid factor units is 5, if then execution in step 105; If not, execution in step S104 then;
Step S104 is treated to 5 with the figure place behind the value radix point of described grid factor unit;
Step S105, with the digital arranged in sequence behind the value radix point of described 3 continuous grid factor datas, forming behind the radix point is 15 double number;
Step S106 judges whether to have traveled through described M*N grid factor unit, if, execution in step S107 then; If not, then return step S102;
Step S107 is woven to target grid factor data with described double array, writes described target grid factor data.
2. method according to claim 1 is characterized in that, after described step S102, also comprises the steps:
If from described M*N grid factor unit, extract continuously grid factor unit of 3-K, then replenish K the First Eigenvalue, wherein, described K is greater than 0 and less than 3 positive integer.
3. method according to claim 1 and 2 is characterized in that, described step S104 comprises:
If the figure place behind the value radix point of described grid factor unit, is then given up the numeral behind 5 of the value radix point of grid factor unit greater than 5;
If the figure place behind the value radix point of described grid factor unit is less than 5, then after the value of grid factor unit, replenish Second Eigenvalue, making the figure place behind the radix point is 5.
4. method according to claim 1 is characterized in that, also comprises:
When the value of described grid factor unit is 1, this value is replaced with 0.99999;
When the value of described grid factor unit is 0, this value is replaced with 0.00000.
5. the device that the grid factor data writes is characterized in that, comprising:
Original grid factor data acquisition module is used for obtaining original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1;
The value extraction module of grid factor unit is for the value of extracting successively 3 continuous grid factor units from described M*N grid factor unit;
Whether the figure place judge module is 5 for the figure place behind the value radix point of judging described 3 continuous grid factor units, if then invocation target grid factor data forms module; If not, then call the figure place processing module;
The figure place processing module is used for the figure place behind the value radix point of described grid factor unit is treated to 5;
Target grid factor data forms module, is used for the digital arranged in sequence behind the value radix point of described 3 continuous grid factor datas, and forming behind the radix point is 15 double number;
Judge module is used for judging whether to have traveled through described M*N grid factor unit, if, invocation target grid factor data writing module then; If not, then return the value extraction module of grid factor unit;
Target grid factor data writing module is used for described double array is woven to target grid factor data, writes described target grid factor data.
6. device according to claim 5 is characterized in that, after the value extraction module of described grid factor unit, also comprises such as lower module:
Complementary module, if be used for extracting 3-K continuously grid factor unit from described M*N grid factor unit, additional K the First Eigenvalue then, wherein, described K is greater than 0 and less than 3 positive integer.
7. according to claim 5 or 6 described devices, it is characterized in that, described figure place processing module comprises:
Give up submodule, if be used for figure place behind the value radix point of described grid factor unit greater than 5, then give up the numeral behind 5 of the value radix point of grid factor unit;
Replenish submodule, if be used for figure place behind the value radix point of described grid factor unit less than 5, then replenish Second Eigenvalue after the value of grid factor unit, making the figure place behind the radix point is 5.
8. device according to claim 5 is characterized in that, also comprises:
The first replacement module, the value that is used at described grid factor unit is 1 o'clock, and this value is replaced with 0.99999;
The second replacement module, the value that is used at described grid factor unit is 0 o'clock, and this value is replaced with 0.00000.
9. the method that the grid factor data reads is characterized in that, comprising:
Step S201 reads target grid factor data; Wherein, described target grid factor data is that 15 double array becomes after by radix point;
Step S202 resolves the value of the grid factor unit in the target grid factor data successively, and the numeral behind the target grid factor data radix point is divided into 3 groups according to the order of sequence, and 5 every group, forming behind the radix point is the value of 3 continuous grid factor units of 5.
Step S203 judges whether to have traveled through described target grid factor data, if, execution in step S204 then; If not, then return step S202;
Step S204 organizes the value of described grid factor unit according to the order of sequence, obtains original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1.
10. the device that the grid factor data reads is characterized in that, comprising:
Target grid factor data read module is used for reading target grid factor data; Wherein, described target grid factor data is that 15 double array becomes after by radix point;
Target grid factor data parsing module, be used for resolving successively the value of the grid factor unit of target grid factor data, numeral behind the target grid factor data radix point is divided into 3 groups according to the order of sequence, and 5 every group is the value of 3 continuous grid factor units of 5 behind the formation radix point.
The Ergodic judgement module is used for judging whether to have traveled through described target grid factor data, if then call original grid factor data acquisition module; If not, then return target grid factor data parsing module;
Original grid factor data acquisition module, the value for organizing according to the order of sequence described grid factor unit obtains original grid factor data; Described original grid factor data comprises M*N grid factor unit, and described M is row, and N is row, and the value of described M*N grid factor unit is the floating type number between 0 to 1.
CN201210287626.6A 2012-08-13 2012-08-13 The method of grid factor data write and device, the method for reading and device Active CN102902712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210287626.6A CN102902712B (en) 2012-08-13 2012-08-13 The method of grid factor data write and device, the method for reading and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210287626.6A CN102902712B (en) 2012-08-13 2012-08-13 The method of grid factor data write and device, the method for reading and device

Publications (2)

Publication Number Publication Date
CN102902712A true CN102902712A (en) 2013-01-30
CN102902712B CN102902712B (en) 2015-08-12

Family

ID=47574945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210287626.6A Active CN102902712B (en) 2012-08-13 2012-08-13 The method of grid factor data write and device, the method for reading and device

Country Status (1)

Country Link
CN (1) CN102902712B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5504591A (en) * 1994-04-25 1996-04-02 Microsoft Corporation System and method for compressing graphic images
US20010036308A1 (en) * 2000-04-28 2001-11-01 Osamu Katayama Image data compressing method and apparatus which compress image data separately by modifying color
CN102508853A (en) * 2011-09-28 2012-06-20 北京地拓科技发展有限公司 Method and system for filling raster data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5504591A (en) * 1994-04-25 1996-04-02 Microsoft Corporation System and method for compressing graphic images
US20010036308A1 (en) * 2000-04-28 2001-11-01 Osamu Katayama Image data compressing method and apparatus which compress image data separately by modifying color
CN102508853A (en) * 2011-09-28 2012-06-20 北京地拓科技发展有限公司 Method and system for filling raster data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘於勋等: "浅谈栅格数据结构及其压缩编码方法", 《郑州工业高等专科学校学报》 *
吴正升等: "基于2维行程的栅格数据快速动态压缩算法", 《测绘科学技术学报》 *

Also Published As

Publication number Publication date
CN102902712B (en) 2015-08-12

Similar Documents

Publication Publication Date Title
CN109992636B (en) Space-time coding method, space-time index and query method and device
CN102411616B (en) Method and system for storing data and data management method
CN102646130B (en) Method for storing and indexing mass historical data
CN110471795A (en) Block chain state data reconstruction method and device, electronic equipment
CN103425772A (en) Method for searching massive data with multi-dimensional information
CN101916299A (en) Three-dimensional spatial data storage and management method based on file system
CN102662639A (en) Mapreduce-based multi-GPU (Graphic Processing Unit) cooperative computing method
CN111104457A (en) Massive space-time data management method based on distributed database
CN103678519A (en) Mixed storage system and mixed storage method for supporting Hive DML (data manipulation language) enhancement
CN104217023A (en) Method for realizing map tile storage by package technology
CN106991149B (en) Massive space object storage method fusing coding and multi-version data
CN102902590B (en) Parallel digital terrain analysis-oriented massive DEM (Digital Elevation Model) deploying and scheduling method
CN106055678A (en) Hadoop-based panoramic big data distributed storage method
US20180210919A1 (en) Network common data form data management
CN106844288A (en) A kind of random string generation method and device
CN114048203A (en) Beidou grid space indexing and retrieval method and device based on database B-tree index
CN104112011A (en) Method and device for extracting mass data
CN112214472A (en) Meteorological grid point data storage and query method, device and storage medium
Puri et al. MPI-Vector-IO: Parallel I/O and partitioning for geospatial vector data
CN103049561B (en) A kind of data compression method, storage engines and storage system
CN102867023B (en) Method for storing and reading grid data and device
CN102932416A (en) Intermediate data storage method, processing method and device in information flow task
CN102207964B (en) Real-time massive data index construction method and system
CN102024052B (en) Method and device for realizing transaction of data storage system
CN109299197A (en) A kind of partition method of data cube, system and terminal device

Legal Events

Date Code Title Description
C06 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