1 / 34

Reprojecting Raster Data of Global Extent

Reprojecting Raster Data of Global Extent. Auto-Carto 2005: A Research Symposium 21 - 23 March, 2005 Las Vegas, Nevada. E. Lynn Usery usery@usgs.gov. Reprojecting Raster Data of Global Extent. Daniel R. Steinwand,

ulf
Download Presentation

Reprojecting Raster Data of Global Extent

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Reprojecting Raster Data of Global Extent Auto-Carto 2005: A Research Symposium 21 - 23 March, 2005 Las Vegas, Nevada E. Lynn Usery usery@usgs.gov

  2. Reprojecting Raster Data of Global Extent • Daniel R. Steinwand, • Science Applications International Corp., USGS National Center for Earth Resources Observation and Science (EROS), Sioux Falls, SD • Michael P. Finn, Jason R. Trent, E. Lynn Usery, and Robert A. Buehler, • USGS, Mid-Continent Mapping Center, Rolla, MO

  3. Outline • Objectives • Approach • Methods • Coordinate Transformations • Framing (Output Frame) • Forward vs. Inverse Mapping (Reprojection) • Wraparound • Resampling • Implementing a map image projection program • Conclusions

  4. Objectives • Solve problems associated with projection of global raster datasets and corresponding errors to global environmental models • Provide a software package that better handles known problems (including raster categorical resampling) for wide use in the modeling community

  5. Approach • Expand on previous research • Handle identified issues and problems • Chain various geospatial, computational, and map projection methods into a solution framework • Implement a software package to handle the reprojection of global raster datasets

  6. Methods • Coordinate Transformations • Framing • Output Frame (Geographic MinBox and Direct Specification) • Forward vs. Inverse Mapping • Reprojection (Algorithm) • Wraparound • Resampling • Categorical Resampling

  7. Coordinate Transformations • Subroutine packages usually operate on a point-by-point basis • General Cartographic Transformation Package (GCTP) • Point-by-point basis • C programming language • Works for both vector and raster data • Datum transformations usually included

  8. Framing • Extent of the image (raster data) in projection space • Where and how that space is aligned with the image coordinate system • First-order transformation (translation and scaling) • Tie two coordinate systems together • UL image pixel to center of UL pixel in projection space • Equations (image to/ from projection coordinates) • Determine Output Image Frame

  9. Framing EquationsImage to/ from projection coordinates • X = ULprojX + (sample – 1) * pixelSizeX • Y = ULprojY – (line – 1) * pixelSizeY • Line = (ULprojY – Y)/pixelSizeY + 1 • Sample = (X – ULprojX)/PixelSizeX + 1 (Upper Left image pixel is pixel (1,1), i.e., 1-relative coordinates)

  10. Determine Output Image Frame • The geographic extent of the (re)projection output image • In units of the output image projection system • Common Methods • The geographic MinBox • Direct specification of output projection extent

  11. Determine Output Image Frame The Geographic MinBox • User defines output image extent with UpperLeft and LowerRight geographic coordinates

  12. Determine Output Image Frame The Geographic MinBox • The frame is conceptualized in geographic space (with grid lines added for clarification)

  13. Determine Output Image Frame The Geographic MinBox • This space is converted to the output projection. • Corners & Sides of the frame are converted (piecewise) and projection coordinate minimums and maximums are recorded.

  14. Determine Output Image Frame The Geographic MinBox • Locations of the min/max projection coordinates are noted.

  15. Determine Output Image Frame The Geographic MinBox • The minimum and maximum extents form the MinBox—this is the extent of the output image. • The number of lines and samples are determined by dividing these dimensions by the pixel size.

  16. Determine Output Image Frame The Geographic MinBox • If the MinBox algorithm is not applied, and only the UL and LR geographic coordinates are used to determine projection min/max, clipping of the frame can occur.

  17. Determine Output Image Frame Direct specification of projection extent • User specifies the min and max coordinates of the output space • Or, alternatively: Specify the UL corner of the image and the number of lines and samples

  18. Forward vs. Inverse Mapping • Inverse mapping algorithm • Steps through the output image space and calculates the corresponding coordinates in the input image; then selects the pixel value (and perhaps neighboring values) at those input coordinates

  19. Inverse Mapping AlgorithmPseudo CodeSimplest case: point-by-point, nearest neighbor • For each line in the output image: • For each pixel in this output image line: • Determine the output space projection coordinate for this pixel • Convert the coordinate to the input space projection • Determine the input space image coordinate • Grab the image value(s) at the input image coordinate

  20. The Wraparound Problem

  21. Resampling • Geospatial data of global extent can suffer from great geometric distortions when being reprojected • Errors associate with these distortions and scale changes affect resampling within the reprojection function, especially for categorical data

  22. ResamplingNearest Neighbor • 1 point in the output space image and map that point into the input image space (via the inverse mapping algorithm)

  23. ResamplingNearest Neighbor • If the resolution of the output imagery is reduced (downsampling), adjacent pixels in the output may fall more the 1 pixel away in the input (via the inverse mapping algorithm)

  24. Categorical Resampling • New resampling algorithm treats pixels as areas (not points, Steinwand (2003)) • 4 corners of each pixel are mapped into the input space • Many pixels involved • Can apply simple statistical methods to determine output image pixels based on the area the pixel coverage in the input image

  25. MapImg: An ImplementationTypical Output Solves wraparound problem Extreme Downsampling and Reprojection with the Nearest Neighbor

  26. MapImg: Output Can provide better categorical resampling in extreme downsampling

  27. MapImgStand-Alone Program • Multiplatform • MS Windows • UNIX (many variants) • Linux • User interface (startup screen)

  28. MapImgProgram controls • Via dialog boxes • Data type • User’s projection choices • All parameter entries • Provides user’s with • Reprojected image • A metadata file • Summary window • Optional log file

  29. MapImgC and C++ • GCTP at the core • Software design =>

  30. MapImgMetadata (.info) File

  31. MapImgTechniques, I/O, Data Structures, Algorithms • Utilizes multiple techniques for input, storage, and output of various data files (primarily generic binary raster images) • 3 primary data structures • IMGINFO structure • The projinfo class • The GUI • 2 major algorithms within mapimg.exe • mapframeit() • mapimg()

  32. mapimg.exe • mapframeit algorithm • Calculates the row and column dimension • Caluclates the UL corner for a given projection • mapimg algorithm • Loops through every row and column in the output raster and loads the appropriate value • Checks for fill values and wraparound • Controls I/O buffering for time optimization

  33. Conclusions • Projection of global raster data is a significant problem • Categorical resampling with modal categories yields better results than nearest neighbor methods • MapImg program provides solutions to raster data reprojection for a variety of computer architectures and is freely available

  34. Reprojecting Raster Data of Global Extent Auto-Carto 2005: A Research Symposium 21 - 23 March, 2005 Las Vegas, Nevada http://carto-research.er.usgs.gov/projection/index.html

More Related