Download presentation
Presentation is loading. Please wait.
Published byDarren Woods Modified over 9 years ago
1
U.S. Department of the Interior U.S. Geological Survey 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 Equations Image 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 Algorithm Pseudo Code Simplest 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
Resampling Nearest Neighbor 1 point in the output space image and map that point into the input image space (via the inverse mapping algorithm)
23
Resampling Nearest 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 Implementation Typical Output Solves wraparound problem Extreme Downsampling and Reprojection with the Nearest Neighbor
26
MapImg: Output Can provide better categorical resampling in extreme downsampling
27
MapImg Stand-Alone Program Multiplatform MS Windows UNIX (many variants) Linux User interface (startup screen)
28
MapImg Program 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
MapImg C and C++ GCTP at the core Software design =>
30
MapImg Metadata (.info) F ile Data ParameterComments Rows & ColumnsSpace delimited integers Projection NumberGCTP code for the map projection Zone NumberFor UTM projection Unit TypeFor length measurements (currently only supports meters) Spheroid NumberGCTP code for datum (currently only supports sphere of radius 6370997 meters) Pixel SizeScale width of a pixel in areas of true scale Upper Left Longitude/ Upper Left Latitude Geographic coordinates of corner 15 GCTP parametersSpace delimited real number (floating point) values Data typePre-defined string
31
MapImg Techniques, 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
U.S. Department of the Interior U.S. Geological Survey 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
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.