CN102902712B - The method of grid factor data write and device, the method for reading and device - Google Patents

The method of grid factor data write and device, the method for reading and device Download PDF

Info

Publication number
CN102902712B
CN102902712B CN201210287626.6A CN201210287626A CN102902712B CN 102902712 B CN102902712 B CN 102902712B CN 201210287626 A CN201210287626 A CN 201210287626A CN 102902712 B CN102902712 B CN 102902712B
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.)
Active
Application number
CN201210287626.6A
Other languages
Chinese (zh)
Other versions
CN102902712A (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

Abstract

This application provides method and device, the method for reading and the device of the write of a kind of grid factor data, wherein, the method for described grid factor data write comprises: step S101, obtains original grid factor data; Step S102, extracts the value of 3 continuous grid factor units; Step S103, judges whether the figure place after the value radix point of grid factor unit is 5, if so, then performs step 105; If not, then step S104 is performed; Step S104, is treated to 5 by the figure place after the value radix point of grid factor unit; Step S105, by the digital arranged in sequence after the value radix point of 3 continuous grid factor datas, is the double number of 15 after forming a radix point; Step S106, judges whether to have traveled through, and if so, then performs step S107; If not, then step S102 is returned; Step S107, is woven to target grid factor data by double array, write target grid factor data.The application can improve grid factor data and store the efficiency with transmission, improves calculated performance.

Description

The method of grid factor data write and device, the method for reading and device
Technical field
The application relates to the technical field of grid factor data process, 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
A raster data regular grids describes position and the value of the spatial phenomenon feature corresponding with each grid cell position.Conceptually the change of spatial phenomenon is reflected by the change of grid cell value.In GIS (Geographic Information System, Geographic Information System) system, many data all represent with grid format.Raster calculate is also referred to as grid (Grid), grating map, surface coverage (Surface Cover) or image in generalized information system.Grid is made up of row, column, grid cell.Row, column is initial by the grid upper left corner.In two-dimensional coordinate system, go as y coordinate, arrange as x coordinate.Somewhat similar as x coordinate as y coordinate, longitude with latitude in this.
The single grid cell representative point of raster data, to represent the set representative face of line, adjacent grid with a series of adjacent cells unit.Each grid cell in grid has value, integer or a floating type.Integer grid cell value represents categorical data usually.Such as, land type conventional 1 represents urban land, 2 and represents forest land etc.Floating type grid cell value often represents continuous data, and such as, quantity of precipitation model may have the precipitation values such as 20,15,12,23.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 arranges a grid cell by the capable N of M and forms, each grid cell stores real-coded GA.If by commonsense method, each grid cell 4 bytes store, then need M*N*4 byte, and storage space required is like this very large, this storage to system, performance, and the transfer efficiency of network all requires very high.
Because in the systems such as GIS, data volume is huge, the storage space stored needed for this floating type grid factor data is quite huge, and the resource cost transmitting this floating type grid factor data is large, and the computing treatment effeciency of system is low.How to reduce the storage space needed for floating type grid factor data, improve floating type grid factor data and store the efficiency with transmission, improving calculated performance, is the technical matters needing those skilled in the art urgently to solve at present.
Summary of the invention
Technical problems to be solved in this application are to provide method and the device of the write of a kind of grid factor data, the method that grid factor data reads and device, in order to reduce the storage space needed for raster data, improve floating type grid factor data and store the efficiency with transmission, improve calculated performance.
In order to solve the problem, this application discloses the method for a kind of grid factor data write, 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 after the value radix point of described 3 continuous grid factor units is 5, if so, then performs step 105; If not, then step S104 is performed;
Step S104, is treated to 5 by the figure place after the value radix point of described grid factor unit;
Step S105, by the digital arranged in sequence after the value radix point of described 3 continuous grid factor datas, is the double number of 15 after forming a radix point;
Step S106, judges whether to have traveled through described M*N grid factor unit, if so, then performs step S107; If not, then step S102 is returned;
Step S107, is woven to target grid factor data by described double array, writes described target grid factor data.
Preferably, after described step S102, also comprise the steps:
If extract 3-K grid factor unit continuously from described M*N grid factor unit, then supplement K the First Eigenvalue, wherein, described K be greater than 0 and be less than 3 positive integer.
Preferably, described step S104 comprises:
If the figure place after the value radix point of described grid factor unit is greater than 5, then give up the numeral after the value radix point 5 of grid factor unit;
If the figure place after the value radix point of described grid factor unit is less than 5, then after the value of grid factor unit, supplements Second Eigenvalue, make the figure place after radix point be 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 of a kind of grid factor data write, comprising:
Original grid factor data acquisition module, 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, for extracting the value of 3 continuous grid factor units successively from described M*N grid factor unit;
Figure place judge module, for judge described 3 continuous grid factor units value radix point after figure place whether be 5, if so, then invocation target grid factor data forms module; If not, then figure place processing module is called;
Figure place processing module, for being treated to 5 by the figure place after the value radix point of described grid factor unit;
Target grid factor data forms module, for by the digital arranged in sequence after the value radix point of described 3 continuous grid factor datas, is the double number of 15 after forming a radix point;
Judge module, has traveled through described M*N grid factor unit for judging whether, if so, then invocation target grid factor data writing module; If not, then the value extraction module of grid factor unit is returned;
Target grid factor data writing module, 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 as lower module:
Complementary module, if for extracting 3-K grid factor unit continuously from described M*N grid factor unit, then supplement K the First Eigenvalue, wherein, described K be greater than 0 and be less than 3 positive integer.
Preferably, described figure place processing module comprises:
Give up submodule, if be greater than 5 for the figure place after the value radix point of described grid factor unit, then give up the numeral after the value radix point 5 of grid factor unit;
Supplement submodule, if be less than 5 for the figure place after the value radix point of described grid factor unit, then after the value of grid factor unit, supplement Second Eigenvalue, make the figure place after radix point be 5.
Preferably, described device also comprises:
First replacement module, for when the value of described grid factor unit is 1, replaces with 0.99999 by this value;
Second replacement module, for when the value of described grid factor unit is 0, replaces with 0.00000 by this value.
The embodiment of the present application also discloses a kind of method that grid factor data reads, and comprising:
Step S201, reads target grid factor data; Wherein, described target grid factor data is become by the double array after radix point being 15;
Step S202, resolves the value of the grid factor unit in target grid factor data successively, the numeral after target grid factor data radix point is divided into 3 groups according to the order of sequence, often organize 5, is the value of 3 continuous print grid factor units of 5 after forming radix point.
Step S203, judges whether to have traveled through described target grid factor data, if so, then performs step S204; If not, then step S202 is returned;
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, for reading target grid factor data; Wherein, described target grid factor data is become by the double array after radix point being 15;
Target grid factor data parsing module, for resolving the value of the grid factor unit in target grid factor data successively, numeral after target grid factor data radix point being divided into 3 groups according to the order of sequence, often organizing 5, is the value of 3 continuous print grid factor units of 5 after forming radix point.
Ergodic judgement module, having traveled through described target grid factor data for judging whether, if so, then having called original grid factor data acquisition module; If not, then target grid factor data parsing module is returned;
Original grid factor data acquisition module, for organizing 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.
Compared with prior art, the application comprises following advantage:
The application is for the grid factor data of Distribution value between 0 to 1 of grid factor unit, original grid factor data is extracted successively 3 continuous print grid factor units, substitute with the double number of 8 bytes, the storage space of such saving grid factor data, the performance of effective raising system.
Specifically, the embodiment of the present application can substitute 3 continuous print grid factor units in original grid factor unit with the double number of 8 bytes, in this case, the grid factor data of original need 34 bytes, can store by 8 bytes, like this, when carrying out raster data backup, information that can be same with less Resource Storage, takes full advantage of storage space.In addition, due to the minimizing of storage space, the application can also improve floating type grid factor data and store the efficiency with transmission, improves calculated performance.
Accompanying drawing explanation
Fig. 1 is the flow chart of steps of the embodiment of the method for a kind of grid factor data write of the application;
Fig. 2 is the flow chart of steps of the embodiment of the method that a kind of grid factor data of the application reads;
Fig. 3 is the structured flowchart of the device embodiment of a kind of grid factor data write of the application;
Fig. 4 is the structured flowchart of the device embodiment that a kind of grid factor data of the application reads.
Embodiment
For enabling above-mentioned purpose, the feature and advantage of the application more become apparent, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
One of core idea of the application is, grid factor data between 0 to 1 is all stored in for data, original grid factor data is extracted successively the value of 3 continuous grid factor units, substitute with the double number after a radix point being 15, like this, the grid factor data that original needs 34 byte floating type numbers store, only needs the double number of 8 bytes to store now, greatly saves storage space.
With reference to Fig. 1, show the flow chart of steps of the embodiment of the method for a kind of grid factor data write of the application, 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, have a class raster data to be prevalent in the computing of system, usually serve as the role of design factor or the factor, value, between 0 to 1, is referred to as " grid factor data ".Original grid factor data in the embodiment of the present application, namely refer to that the value of its grid factor unit this is " the grid factor data " of the floating type number between 0 to 1, what namely the grid factor unit of described original grid factor data stored is 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 that floating type number accounts for 4 bytes of storage space based on 32 machines, double number accounts for 8 bytes of storage space.The storage means that the application proposes is that, to grid factor data, from first grid factor unit, continuous 3 grid factor units are as a handling object.
Step S103, judges whether the figure place after the value radix point of described 3 continuous grid factor units is 5, if so, then performs step 105; If not, then step S104 is performed;
Step S104, is treated to 5 by the figure place after 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:
Sub-step S11, if the figure place after the value radix point of described grid factor unit is greater than 5, then gives up the numeral after the value radix point 5 of grid factor unit;
Sub-step S12, if the figure place after the value radix point of described grid factor unit is less than 5, then supplements Second Eigenvalue, makes the figure place after radix point be 5 after the value of grid factor unit.
Such as, described Second Eigenvalue can get 0 value, when the value of 3 the continuous grid factor units extracted 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 after radix point is just 5, then do not need to process, for 0.6789, because the figure place after radix point is less than 5, then mend Second Eigenvalue 0 below, make the figure place after radix point be 5, be namely rewritten as 0.67890, for 0.0123456, because the figure place after radix point is greater than 5, then by abandoning the numeral after radix point 5, making the figure place after radix point be 5, being namely rewritten as 0.01234.By above-mentioned steps, be that the value of the grid factor unit of 5 is 0.12345,0.67890,0.01234 after obtaining 3 radix point.
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 integer number is replaced with floating type number, be convenient to application the embodiment of the present application and carry out computing.
Step S105, by the digital arranged in sequence after the value radix point of described 3 continuous grid factor datas, is the double number of 15 after forming a radix point;
5 figure places after radix point are all rewritten into by the floating type number stored by grid factor unit, obtain 3 revised numbers of continuous print like this, again these 3 revised numbers are together in series, form a double number, this number has 15 figure places after radix point, substitutes 3 original floating type numbers store with this double-precision quantity.
Such as, when the figure place after the value radix point of 3 continuous grid factor datas is treated to 5, the value of the grid factor unit of gained is 0.12345,0.67890,0.01234, arranged in sequence the data obtained is that the double number of 15 is 0.123456789001234 after the radix point obtained.Like this, original floating type grid factor data needing 34 bytes store, can store with the double number of 8 bytes now, when carrying out the backup of grid factor data, fully can save storage space.
Step S106, judges whether to have traveled through described M*N grid factor unit, if so, then performs step S107; If not, then step S102 is returned;
In specific implementation, if when extracting from grid factor unit less than 3 continuous print grid factor units, then add to 3 continuous print grid factor units with the First Eigenvalue.In this case, the embodiment of the present application can also comprise the following steps:
If extract 3-K grid factor unit continuously from described M*N grid factor unit, then supplement K the First Eigenvalue, wherein, described K be greater than 0 and be less than 3 positive integer.
To M*N grid factor unit of grid factor data, be a handling object with continuous 3 grid factor units, the complete all grid factor units of sequential processes.If last remaining 1 or 2 grid factor units, then with neat 3 the grid factor units of 0.0 value complement, form a handling object and process.
Such as, the First Eigenvalue of getting can value be 0 value, is 0.12345 when extracting less than 3 grid factor units, 0.6789, then can supplement the grid factor unit of 10 value, 3 the continuous grid factor units finally supplementing gained are 0.12345,0.6789,0.
Step S107, is woven to target grid factor data by described double array, writes 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
Become by the double array after radix point being 15;
Step S202, resolves the value of the grid factor unit in target grid factor data successively, the numeral after target grid factor data radix point is divided into 3 groups according to the order of sequence, often organize 5, is the value of 3 continuous print grid factor units of 5 after forming radix point.
In specific implementation, application system reads revised grid factor data from file, and resolves grid factor unit value.Suppose that the double number of file reading has T, then the figure place after the radix point of each double number is 15.To this T double number processed in sequence, if double number is 0.abcdefghijklmnp, the numeral after its radix point is divided into 3 groups according to the order of sequence, often organize 5, after 3 radix point reformulated, the value of the grid factor unit of 5 figure places is 0.abcde, 0.fghij, 0.klmnp.
The application can carry out efficient storage to grid factor data, carry out grid because of outside sublattice data backup, the application can also assemble efficiently to common grid factor data, less data volume can be obtained, when carrying out Internet Transmission, the reciever of transmission is resolved by the application again, just can obtain original grid factor data.1/3 volume of transmitted data of commonsense method can be saved like this.
Step S203, judges whether to have traveled through described target grid factor data, if so, then performs step S204; If not, then step S202 is returned;
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 assembling are resolved, all simply can carry out computing fast in CPU, efficiency quickly, compared with commonsense method reading and writing of files, Internet Transmission, be not an order of magnitude other, so the application well can improve system performance.
It should be noted that, for embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the application is not by 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 instructions all belongs to preferred embodiment, and involved action and module might not be that the application is necessary.
With reference to Fig. 3, show the structured flowchart of the device embodiment of a kind of grid factor data write of the application, specifically can comprise with such as lower module:
Original grid factor data acquisition module 401, 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, for extracting the value of 3 continuous grid factor units successively 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 as lower module:
Complementary module, if for extracting 3-K grid factor unit continuously from described M*N grid factor unit, then supplement K the First Eigenvalue, wherein, described K be greater than 0 and be less than 3 positive integer.
Figure place judge module 403, for judge described 3 continuous grid factor units value radix point after figure place whether be 5, if so, then invocation target grid factor data forms module; If not, then figure place processing module is called;
Figure place processing module 404, for being treated to 5 by the figure place after the value radix point of described grid factor unit;
In a preferred embodiment of the present application, described figure place processing module comprises:
Give up submodule, if be greater than 5 for the figure place after the value radix point of described grid factor unit, then give up the numeral after the value radix point 5 of grid factor unit;
Supplement submodule, if be less than 5 for the figure place after the value radix point of described grid factor unit, then after the value of grid factor unit, supplement Second Eigenvalue, make the figure place after radix point be 5.
In a preferred embodiment of the present application, described device can also comprise as lower module:
First replacement module, for when the value of described grid factor unit is 1, replaces with 0.99999 by this value;
Second replacement module, for when the value of described grid factor unit is 0, replaces with 0.00000 by this value.
Target grid factor data forms module 405, for by the digital arranged in sequence after the value radix point of described 3 continuous grid factor datas, is the double number of 15 after forming a radix point;
Ergodic judgement module 406, has traveled through described M*N grid factor unit for judging whether, if so, then invocation target grid factor data writing module; If not, then the value extraction module of grid factor unit is returned;
Target grid factor data writing module 407, for described double array is woven to target grid factor data, writes described target grid factor data.
For the device embodiment shown in Fig. 3, due to the embodiment of the method basic simlarity shown in itself and Fig. 1, so description is fairly simple, relevant part illustrates see the part 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, for reading target grid factor data; Wherein, described target grid factor data is become by the double array after radix point being 15;
Target grid factor data parsing module 502, for resolving the value of the grid factor unit in target grid factor data successively, numeral after target grid factor data radix point being divided into 3 groups according to the order of sequence, often organizing 5, is the value of 3 continuous print grid factor units of 5 after forming radix point.
Ergodic judgement module 503, having traveled through described target grid factor data for judging whether, if so, then having called original grid factor data acquisition module; If not, then target grid factor data parsing module is returned;
Original grid factor data acquisition module 504, for organizing 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.
For the device embodiment shown in Fig. 4, due to the embodiment of the method basic simlarity shown in itself and Fig. 2, so description is fairly simple, relevant part illustrates see the part 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 the difference with other embodiments, between each embodiment identical similar part mutually see.
Those skilled in the art should understand, the embodiment of the application can be provided as method, device or computer program.Therefore, the application can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the application can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code.
The application describes with reference to according to the process flow diagram of the method for the embodiment of the present application, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Although described the preferred embodiment of the application, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the application's scope.
Finally, also it should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
Above to method and the device of a kind of grid factor data write that the application provides, the method that grid factor data reads and device, be described in detail, apply specific case herein to set forth the principle of the application and embodiment, the explanation of above embodiment is just for helping method and the core concept thereof of understanding the application; Meanwhile, for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application.

Claims (10)

1. a method for grid factor data write, 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 after the value radix point of described 3 continuous grid factor units is 5, if so, then performs step 105; If not, then step S104 is performed;
Step S104, is treated to 5 by the figure place after the value radix point of described grid factor unit;
Step S105, by the digital arranged in sequence after the value radix point of described 3 continuous grid factor datas, is the double number of 15 after forming a radix point;
Step S106, judges whether to have traveled through described M*N grid factor unit, if so, then performs step S107; If not, then step S102 is returned;
Step S107, is woven to target grid factor data by 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 extract 3-K grid factor unit continuously from described M*N grid factor unit, then supplement K the First Eigenvalue, wherein, described K be greater than 0 and be less than 3 positive integer; Described the First Eigenvalue is 0.
3. method according to claim 1 and 2, is characterized in that, described step S104 comprises:
If the figure place after the value radix point of described grid factor unit is greater than 5, then give up the numeral after the value radix point 5 of grid factor unit;
If the figure place after the value radix point of described grid factor unit is less than 5, then after the value of grid factor unit, supplements Second Eigenvalue, make the figure place after radix point be 5; Described Second Eigenvalue is 0.
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. a device for grid factor data write, is characterized in that, comprising:
Original grid factor data acquisition module, 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, for extracting the value of 3 continuous grid factor units successively from described M*N grid factor unit;
Figure place judge module, for judge described 3 continuous grid factor units value radix point after figure place whether be 5, if so, then invocation target grid factor data forms module; If not, then figure place processing module is called;
Figure place processing module, for being treated to 5 by the figure place after the value radix point of described grid factor unit;
Target grid factor data forms module, for by the digital arranged in sequence after the value radix point of described 3 continuous grid factor datas, is the double number of 15 after forming a radix point;
Judge module, has traveled through described M*N grid factor unit for judging whether, if so, then invocation target grid factor data writing module; If not, then the value extraction module of grid factor unit is returned;
Target grid factor data writing module, 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 as lower module:
Complementary module, if for extracting 3-K grid factor unit continuously from described M*N grid factor unit, then supplement K the First Eigenvalue, wherein, described K be greater than 0 and be less than 3 positive integer; Described the First Eigenvalue is 0.
7. the device according to claim 5 or 6, is characterized in that, described figure place processing module comprises:
Give up submodule, if be greater than 5 for the figure place after the value radix point of described grid factor unit, then give up the numeral after the value radix point 5 of grid factor unit;
Supplement submodule, if be less than 5 for the figure place after the value radix point of described grid factor unit, then after the value of grid factor unit, supplement Second Eigenvalue, make the figure place after radix point be 5; Described Second Eigenvalue is 0.
8. device according to claim 5, is characterized in that, also comprises:
First replacement module, for when the value of described grid factor unit is 1, replaces with 0.99999 by this value;
Second replacement module, for when the value of described grid factor unit is 0, replaces with 0.00000 by this value.
9. a method for grid factor data reading, is characterized in that, comprising:
Step S201, reads target grid factor data; Wherein, described target grid factor data is become by the double array after radix point being 15;
Step S202, resolves the value of the grid factor unit in target grid factor data successively, the numeral after target grid factor data radix point is divided into 3 groups according to the order of sequence, often organize 5, is the value of 3 continuous print grid factor units of 5 after forming radix point;
Step S203, judges whether to have traveled through described target grid factor data, if so, then performs step S204; If not, then step S202 is returned;
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. a device for grid factor data reading, is characterized in that, comprising:
Target grid factor data read module, for reading target grid factor data; Wherein, described target grid factor data is become by the double array after radix point being 15;
Target grid factor data parsing module, for resolving the value of the grid factor unit in target grid factor data successively, numeral after target grid factor data radix point being divided into 3 groups according to the order of sequence, often organizing 5, is the value of 3 continuous print grid factor units of 5 after forming radix point;
Ergodic judgement module, having traveled through described target grid factor data for judging whether, if so, then having called original grid factor data acquisition module; If not, then target grid factor data parsing module is returned;
Original grid factor data acquisition module, for organizing 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.
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 CN102902712A (en) 2013-01-30
CN102902712B true 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 (2)

* 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
CN102508853A (en) * 2011-09-28 2012-06-20 北京地拓科技发展有限公司 Method and system for filling raster data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6836564B2 (en) * 2000-04-28 2004-12-28 Denso Corporation Image data compressing method and apparatus which compress image data separately by modifying color

Patent Citations (2)

* 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
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维行程的栅格数据快速动态压缩算法;吴正升等;《测绘科学技术学报》;20070630;第24卷(第3期);207-209 *
浅谈栅格数据结构及其压缩编码方法;刘於勋等;《郑州工业高等专科学校学报》;20040930;第20卷(第3期);5,6,12 *

Also Published As

Publication number Publication date
CN102902712A (en) 2013-01-30

Similar Documents

Publication Publication Date Title
CN102411616B (en) Method and system for storing data and data management method
Ma et al. Query processing of massive trajectory data based on mapreduce
CN101916299B (en) Three-dimensional spatial data storage and management method based on file system
CN101976468B (en) Method and system for visualizing multiresolution dynamic landform
CN103412962A (en) Storage method and reading method for mass tile data
CN104216961A (en) Method and device for data processing
CN109241159B (en) Partition query method and system for data cube and terminal equipment
CN111475597B (en) Non-rigid grid coding, spatial object unique identification and query method and device
CN105550977A (en) Parallel mode grid image slicing method
US10558665B2 (en) Network common data form data management
CN104217023A (en) Method for realizing map tile storage by package technology
US10818083B1 (en) Pyramid generation via depth-first walk
CN111104457A (en) Massive space-time data management method based on distributed database
CN104112011A (en) Method and device for extracting mass data
CN106055678A (en) Hadoop-based panoramic big data distributed storage method
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
CN103761291A (en) Geographical raster data parallel reading-writing method based on request aggregation
Puri et al. MPI-Vector-IO: Parallel I/O and partitioning for geospatial vector data
CN112486987A (en) City inquiry method, device, equipment and storage medium based on longitude and latitude
CN103049561B (en) A kind of data compression method, storage engines and storage system
CN102867023B (en) Method for storing and reading grid data and device
CN104462080A (en) Index structure creating method and system with group statistics for search results
CN103093413B (en) A kind of remote sensing image data write and the method and apparatus read
CN102902712B (en) The method of grid factor data write and device, the method for reading and 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