locationtech / geotrellis

GeoTrellis is a geographic data processing engine for high performance applications.
http://geotrellis.io
Other
1.33k stars 360 forks source link

Polar projection issue #1488

Closed pomadchin closed 7 years ago

pomadchin commented 8 years ago

Noticed reprojection problems during ingest with a file:

$ gdalinfo -proj4 TMP_TGL_2.tiff 
Driver: GTiff/GeoTIFF
Files: TMP_TGL_2.tiff
Size is 601, 301
Coordinate System is:
GEOGCS["Coordinate System imported from GRIB file",
    DATUM["unknown",
        SPHEROID["Sphere",6371229,0]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
PROJ.4 string is:
'+proj=longlat +a=6371229 +b=6371229 +no_defs '
Origin = (179.699999999999989,90.299999999999997)
Pixel Size = (0.600000000000000,-0.600000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( 179.7000000,  90.3000000) (179d42' 0.00"E, 90d18' 0.00"N)
Lower Left  ( 179.7000000, -90.3000000) (179d42' 0.00"E, 90d18' 0.00"S)
Upper Right (     540.300,      90.300) (Invalid angle, 90d18' 0.00"N)
Lower Right (     540.300,     -90.300) (Invalid angle, 90d18' 0.00"S)
Center      (     360.000,       0.000) (360d 0' 0.00"E,  0d 0' 0.01"N)
Band 1 Block=601x1 Type=Float64, ColorInterp=Gray
  Description = 2[m] HTGL="Specified height level above ground"
  Metadata:
    GRIB_COMMENT=Temperature [C]
    GRIB_ELEMENT=TMP
    GRIB_FORECAST_SECONDS=43200 sec
    GRIB_PDS_PDTN=0
    GRIB_PDS_TEMPLATE_NUMBERS=0 0 2 47 47 0 0 0 1 0 0 0 12 103 0 0 0 0 2 255 255 255 255 255 255
    GRIB_REF_TIME=1461715200 sec UTC
    GRIB_SHORT_NAME=2-HTGL
    GRIB_UNIT=[C]
    GRIB_VALID_TIME=1461758400 sec UTC

/cc: @dwins

dwins commented 8 years ago

I notice that this dataset is in the unusual state of having the minimum longitude at 180W. Even gdalinfo is having trouble with this (showing "Invalid angle" when trying to format the maximum of 540W.) You can try resetting to a more usual orientation with gdal_translate ; I verified you can do this with gdal_translate -a_ullr -180.3 90.3 180.3 -90.3 -of GTiff ~/Downloads/TMP_TGL_2.tiff TMP_TGL_2_adjusted.tiff . With this perhaps the ingest will work more easily.

pomadchin commented 7 years ago

thx @dwins!