Fast transmission algorithm of remote sensing image

Source: Internet
Author: User

The rapid development of remote sensing technology provides people with a lot of information about the Earth's space, however, making map cache is a very time consuming work, according to the traditional method of cutting and caching, the image data cannot be used in time, that is, the timeliness is poor; the slicing process is frequent, difficult to manage and requires strong hardware support. , the large amount of slicing data is prone to problems such as disk fragmentation, so how to solve the problem of tile fragmentation is the key to solve the rapid transmission of remote sensing images.

Imagine such a scenario: if the space adjacent tiles on disk storage is also relevant, so not only can solve the problem of disk fragmentation, but also reduce the seek for the disk, optimize the transmission of remote sensing images. It is well known that the Hilbert curve is the best spatial filling curve of spatial autocorrelation at present, if the remote sensing tile is indexed by this curve as index, the re-organization of remote sensing tile is realized.

German mathematician David Hilbert discovered a curve, first dividing a square into four small squares, starting from the center of the square in the southwest corner, heading north to the center of the northwest Square, then toward the center of the square in the east to the northeast corner, and then south to the southeast corner of the Square center, which is an iteration, If the above process is continued on the four small squares, down and repeated, the result is a curve that fills the entire square, which is the Hibert curve, as shown in the approximate process:

650) this.width=650; "Src=" http://img.blog.csdn.net/20150418220337551?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvemhhb3poaxblbmc=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Center "style=" border:none; "/>

Hibert curve generation process

Implementation steps:

1. First, the remote sensing tiles are sliced;

2, using run-length coding to compress the tiles;

3, using Hilbert curve for tile re-coding;

3. The tiles are stored linearly according to the coding, and the coding position is recorded in the index file.

Partial implementation Code:

1, Hilbert code:

[CPP] view plaincopy

  1. //rotate/flip a quadrant appropriately   

  2. voidRot (intN,int*x,int*y,intRx,intry) {  

  3. if (ry = = 0) {

  4. if (Rx = = 1) {

  5. *x = n-1-*x;

  6. *y = n-1-*y;

  7. }

  8. //swap x and y   

  9. int  t = *x;

  10. *x = *y;

  11. *y = t;

  12. }

  13. }

  14. intxy2d (intN,intx,inty) {

  15. int  Rx, Ry, s, d = 0;

  16. for (s = n/2; s>0; S/= 2) {

  17. Rx = (x & S) > 0;

  18. ry = (Y & s) > 0;

  19. D + = S * S * ((3 * rx) ^ ry);

  20. Rot (S, &x, &y, Rx, ry);

  21. }

  22. return  D;

  23. }

  24. //convert D to (x, y)   

  25. voidD2xy (intN,intD,int*x,int*y) {  

  26. int  Rx, Ry, s, t = D;

  27. *x = *y = 0;

  28. for (s = 1; s<n; s *= 2) {

  29. Rx = 1 & (T/2);

  30. ry = 1 & (t ^ rx);

  31. Rot (s, x, Y, Rx, ry);

  32. *x + = s * RX;

  33. *y + = s * ry;

  34. T/= 4;

  35. }

  36. }


Fast transmission algorithm of remote sensing image

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.