Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have 2006 land cover GeoTiff from the USGS site (for a county in VA, USA). The projection is Albers Conical Equal Area Units. The download came with an HTML metadata file that tells me the geo extent in terms of E/W and N/S bounds. If it matters, I created the dataset using the USGS download tool by selecting a particular county.

I am using GDAL to access the data.

If I take the raster sizes and convert the four corners to WGS84 geo coordinates, I get different geo values for the same pixel value. In other words, if the x pixel coordinate is 0, then I get a different latitude depending upon whether y is 0 or 4194 (the raster height). Is this because the rectangular raster image is mapped into a trapezoid on the sphere?

If I take the geo extents from the metadata file and iterate over them, stepping by 1% of the range, converting each geo point to a pixel and line index, I get lots of invalid (negative or too large) index values. Why would this be?

Thanks for any help.

-reilly.

share|improve this question
    
Can you please rework the question to include a link the source of the actual data you are using, and the exact GDAL code or command line arguments you are using for the conversions? –  BradHards Jan 12 '13 at 23:25
    
I bet your SRS for the geotiff is that 'National Albers' with a central meridian that runs through Kansas. The farther away from a central meridian, the worse the distortion. What does gdalinfo report for the central meridian? –  kyle Jan 15 '13 at 22:17
1  
The short answer to your first question is "yes," it's because no portion of the sphere is flat. Something has to give, and even small grids (such as in the USGS 7.5' series) cover enough of the earth's surface for its curvature to affect locational calculations. –  whuber Feb 24 '13 at 20:12

1 Answer 1

Well whuber already gave you the short answer in his comment to your question, but I will elaborate a bit. Remember that latitude and longitude are angular measurements meant for graduating points on the earths ellipsoidal surface. A map projection takes these angular measurements(latitude and longitude) and transforms them into a 2D Cartesian coordinate space. WGS84 gives you these unprojected(untransformed) latitude and longitude coordinates. So, unless you are applying these mathematical transformations (or the compliment to those transformations depending on whether your going from projected to unprojected or unprojected to projected) appropriate to the projection, you will get incorrect or out of bounds numbers, as indeed you are experiencing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.