0

Continuing what is written in this post, I show gdalinfo output

Size is 1200, 1400
Coordinate System is:
PROJCS["unnamed",
    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"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",42],
    PARAMETER["central_meridian",12.5],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-598884.437500000000000,650790.250000000000000)
Pixel Size = (996.479919433593750,-999.677795410156250)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_DATETIME=2018:04:01 00:10:06
  TIFFTAG_DOCUMENTNAME=/datamet/data/tmp/export/RADAR/36/RRN/VMI/VMI.geotif
  TIFFTAG_IMAGEDESCRIPTION=IDL TIFF file
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_SOFTWARE=IDL 8.3, Exelis Visual Information Solutions, Inc.
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -598884.438,  650790.250) (  4d32'13.20"E, 47d34'44.14"N)
Lower Left  ( -598884.438, -748758.664) (  5d56'18.16"E, 35d 4'36.70"N)
Upper Right (  596891.466,  650790.250) ( 20d26'12.34"E, 47d34'50.73"N)
Lower Right (  596891.466, -748758.664) ( 19d 2'23.69"E, 35d 4'40.94"N)
Center      (    -996.486,  -48984.207) ( 12d29'17.00"E, 41d33'32.31"N)
Band 1 Block=1200x1 Type=Float32, ColorInterp=Gray

When I open it using GeoTools I get the following CRS:

PROJCS["unnamed", 
  GEOGCS["WGS 84", 
    DATUM["World Geodetic System 1984", 
      SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], 
      AUTHORITY["EPSG","6326"]], 
    PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], 
    UNIT["degree", 0.017453292519943295], 
    AXIS["Geodetic longitude", EAST], 
    AXIS["Geodetic latitude", NORTH], 
    AUTHORITY["EPSG","4326"]], 
  PROJECTION["Transverse_Mercator"], 
  PARAMETER["central_meridian", 12.5], 
  PARAMETER["latitude_of_origin", 42.0], 
  PARAMETER["scale_factor", �], 
  PARAMETER["false_easting", 0.0], 
  PARAMETER["false_northing", 0.0], 
  UNIT["m", 1.0], 
  AXIS["Easting", EAST], 
  AXIS["Northing", NORTH]]

I made an attempt and I get it

gdalwarp -s_srs "+proj=tmerc +lat_0=42 +lon_0=12.5 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" -t_srs "EPSG:4326" source.tif target.tif 

ERROR 1: Too many points (441 out of 441) failed to transform, unable to compute output bounds. 
Warning 1: Unable to compute source region for output window 0,0,1200,1400, skipping. 
0...10...20...30...40...50...60...70...80...90...100 - done.
3

Your raster is defined with an unusual transverse mercator projection using a classic WGS84 geoid (to be quick, shape of earth). As universal transverse mercator (UTM) are defined using equator as latitude of origin and equally distributed meridians along equator, your's is using 42° north as latitude of origin and 12.5° east as meridian so coordinates are somewhat centered on those coordinates. You can imagine an horizontal cylinder touching earth along 12.5° meridian and having 0 at the 42° north instead of equator

[edit] As per your question, you could project back (as a misuse of language, better unproject) your raster to lat/lon using gdalwarp command

gdalwarp -s_srs "+proj=tmerc +lat_0=42 +lon_0=12.5 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" -t_srs "EPSG:4326" your_raster result.tif

  • -s_srs "+proj=tmerc +lat_0=42 +lon_0=12.5 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" is your projection using proj4 syntax (what is displayed with gdalinfo is OGC/WKT)
  • -t_srs "epsg:4326" stands for lat/lon:wgs84 (what you want)
  • how do I get latitude and longitude for every single point starting from these mercator coordinates? – Alessio Frabotta Apr 6 '18 at 13:28
  • your raster coordinates are projected that means they are on a flat surface instead of being on a spherical surface. latitude/longitude as you request are for sphere so your raster should be "unprojected" to return to spherical coordinates (lat/lon). – Billy34 Apr 6 '18 at 13:33
  • edited my answer with project to lat/lon – Billy34 Apr 6 '18 at 13:59
  • here is the output of the gdalwarp command: ERROR 1: Too many points (441 out of 441) failed to transform, unable to compute output bounds. Warning 1: Unable to compute source region for output window 0,0,1200,1400, skipping. 0...10...20...30...40...50...60...70...80...90...100 - done. – Alessio Frabotta Apr 6 '18 at 14:09
  • 1
    Please Edit the question in response to requests for clarification. It's not fair to those who would answer to need to mine the comments for critical information. – Vince Apr 6 '18 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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