Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S shakyground2
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 11
    • Issues 11
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Shakemap
  • shakyground2
  • Issues
  • #26
Closed
Open
Issue created Oct 29, 2021 by Nils Brinckmann@nilsDeveloper

Tiff output coordinate system problem

When I run gdalinfo over a tiff that comes out of the shakemaps_from_quakeml workflow the coordinate system as a little problem:

Driver: GTiff/GeoTIFF
Files: PGA.tiff
Size is 2107, 1740
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 = (89.594909899532766,27.287898476052039)
Pixel Size = (0.008333333333333,0.008333333333333)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=DEFLATE
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  89.5949099,  27.2878985) ( 89d35'41.68"E, 27d17'16.43"N)
Lower Left  (  89.5949099,  41.7878985) ( 89d35'41.68"E, 41d47'16.43"N)
Upper Right ( 107.1532432,  27.2878985) (107d 9'11.68"E, 27d17'16.43"N)
Lower Right ( 107.1532432,  41.7878985) (107d 9'11.68"E, 41d47'16.43"N)
Center      (  98.3740766,  34.5378985) ( 98d22'26.68"E, 34d32'16.43"N)
Band 1 Block=2107x1 Type=Float64, ColorInterp=Gray

The corner coordinates upper and lower values are reversed.

It is possible to fix those with

gdalwarp PGA.tiff PGA_fixed.tiff -of GTiff -s_srs '+proj=latlong' -t_srs 'epsg:4326' -overwrite

but it would be way better if we could give back a tiff with the right corner coordinates.

The actual spatial projection of the single pixels to points on the globe is not effected by this issue - it seems that just the ordering of the values is different then expected by gdal.

One of the reasons to fix it, is to allow the usage of the tiffs in gmt grdimage. Non fixed versions can result in an error when allocating memory.

Assignee
Assign to
Time tracking