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 tried using the answer from "Transforming EPSG:3857 to EPSG:4326" to do this but gdalinfo tells me that this didn't really work properly.

Driver: GTiff/GeoTIFF
Files: geo-map.tif
Size is 1024, 512
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-179.999999999999545,85.051100000000005)
Pixel Size = (0.351538008801935,-0.332291793794902)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-180.0000000,  85.0511000) (180d 0' 0.00"W, 85d 3' 3.96"N)
Lower Left  (-180.0000000, -85.0822984) (180d 0' 0.00"W, 85d 4'56.27"S)
Upper Right ( 179.9749210,  85.0511000) (179d58'29.72"E, 85d 3' 3.96"N)
Lower Right ( 179.9749210, -85.0822984) (179d58'29.72"E, 85d 4'56.27"S)
Center      (  -0.0125395,  -0.0155992) (  0d 0'45.14"W,  0d 0'56.16"S)
Band 1 Block=1024x2 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA 
Band 2 Block=1024x2 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA 
Band 3 Block=1024x2 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA 
Band 4 Block=1024x2 Type=Byte, ColorInterp=Alpha

The corner coordinates still projects to 180, 85.0511 which is for EPSG:3857. For EPSG:4326, isn't it supposed to be 180, 90?

so I tried translating it again using:

gdal_translate -a_srs EPSG:4326 -a_ullr -180 90 180 -90 geo-map.tif new-geo-map.tif

and got this:

Driver: GTiff/GeoTIFF
Files: new-geo-map.tif
Size is 1024, 512
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-180.000000000000000,90.000000000000000)
Pixel Size = (0.351562500000000,-0.351562500000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-180.0000000,  90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"N)
Lower Left  (-180.0000000, -90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"S)
Upper Right ( 180.0000000,  90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"N)
Lower Right ( 180.0000000, -90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"S)
Center      (   0.0000000,   0.0000000) (  0d 0' 0.01"E,  0d 0' 0.01"N)
Band 1 Block=1024x2 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA 
Band 2 Block=1024x2 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA 
Band 3 Block=1024x2 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA 
Band 4 Block=1024x2 Type=Byte, ColorInterp=Alpha

I realized that it's still not the right thing. The thing is, I need the .tiff to use in WhirlyGlobe but I always end up with a discrepancy. I tried Natural Earth's .tiff on the globe and it worked fine:

Driver: GTiff/GeoTIFF
Files: NE2_LR_LC_SR_W.tif
       NE2_LR_LC_SR_W.tfw
Size is 16200, 8100
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-180.000000000000000,90.000000000000000)
Pixel Size = (0.022222222222220,-0.022222222222220)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_DATETIME=2012:07:16 09:57:53
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_SOFTWARE=Adobe Photoshop CS5 Macintosh
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-180.0000000,  90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"N)
Lower Left  (-180.0000000, -90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"S)
Upper Right ( 180.0000000,  90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"N)
Lower Right ( 180.0000000, -90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"S)
Center      (  -0.0000000,   0.0000000) (  0d 0' 0.00"W,  0d 0' 0.00"N)
Band 1 Block=16200x1 Type=Byte, ColorInterp=Red
Band 2 Block=16200x1 Type=Byte, ColorInterp=Green
Band 3 Block=16200x1 Type=Byte, ColorInterp=Blue

please tell me what I'm doing wrong? :(

share|improve this question
    
The first transformation was successful. The EPSG:3857 data will always only cover between +/- 85,01 ° North. The extent in EPSG:3857 coordinates would be -20037508.34,-20037508.34,20037508.34,20037508.34 "metres". The second transformation was false. –  Andre Joost Aug 30 '13 at 9:29
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.