2

I am using the command: gdalwarp -t_srs WGS84 -te 144 -36 150 -32 -crop_to_cutline AustTopo250_SI55.tif

I need to change the pixel resolution to 50m x 50m but the option is given as -tr xres yres: set output file resolution (in target georeferenced units).

The target unit is degrees. So the question is: How do I generate the output file as 50m x 50m pixels?

Feel free to explain relationship between metres and degrees.

Target File:

E:\>gdalinfo AustTopo250_SI55.tif
Driver: GTiff/GeoTIFF
Files: AustTopo250_SI55.tif
Size is 18750, 12500
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 = (144.000000000000000,-32.000000000000000)
Pixel Size = (0.000320000000000,-0.000320000000000)
Metadata:
  AREA_OR_POINT=Area
  COLORSPACE=RGB
  COMPRESSION_RATE_TARGET=9
  VERSION=2
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( 144.0000000, -32.0000000) (144d 0' 0.00"E, 32d 0' 0.00"S)
Lower Left  ( 144.0000000, -36.0000000) (144d 0' 0.00"E, 36d 0' 0.00"S)
Upper Right ( 150.0000000, -32.0000000) (150d 0' 0.00"E, 32d 0' 0.00"S)
Lower Right ( 150.0000000, -36.0000000) (150d 0' 0.00"E, 36d 0' 0.00"S)
Center      ( 147.0000000, -34.0000000) (147d 0' 0.00"E, 34d 0' 0.00"S)
Band 1 Block=18750x1 Type=Byte, ColorInterp=Red
  Description = Red
Band 2 Block=18750x1 Type=Byte, ColorInterp=Green
  Description = Green
Band 3 Block=18750x1 Type=Byte, ColorInterp=Blue
  Description = Blue

Source File:

E:\>gdalinfo 76943_Aust_gda94.ecw
Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x)
Files: 76943_Aust_gda94.ecw
Size is 128490, 109375
Coordinate System is:
GEOGCS["GEOCENTRIC DATUM of AUSTRALIA",
    DATUM["GDA94",
        SPHEROID["GRS80",6378137,298.257222101]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
Origin = (112.883360000000040,-8.999920000000039)
Pixel Size = (0.000320000000000,-0.000320000000000)
Metadata:
  COLORSPACE=RGB
  COMPRESSION_RATE_TARGET=9
  VERSION=2
Corner Coordinates:
Upper Left  ( 112.8833600,  -8.9999200) (112d53' 0.10"E,  8d59'59.71"S)
Lower Left  ( 112.8833600, -43.9999200) (112d53' 0.10"E, 43d59'59.71"S)
Upper Right ( 154.0001600,  -8.9999200) (154d 0' 0.58"E,  8d59'59.71"S)
Lower Right ( 154.0001600, -43.9999200) (154d 0' 0.58"E, 43d59'59.71"S)
Center      ( 133.4417600, -26.4999200) (133d26'30.34"E, 26d29'59.71"S)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
  Description = Red
  Overviews: 64245x54687, 32122x27343, 16061x13671, 8030x6835, 4015x3417, 2007x1708, 1003x854, 501x427, 250x213
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
  Description = Green
  Overviews: 64245x54687, 32122x27343, 16061x13671, 8030x6835, 4015x3417, 2007x1708, 1003x854, 501x427, 250x213
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
  Description = Blue
  Overviews: 64245x54687, 32122x27343, 16061x13671, 8030x6835, 4015x3417, 2007x1708, 1003x854, 501x427, 250x213 
1
2

If you need a raster with a fixed resolution in meters, you have to reproject your data in a projected CRS, like UTM, Lambert conformal conical or what might be used in Australia.

While degrees of latitude have more or less the same size in meters, one degree of longitude decreases from the equator towards the poles, where it is almost zero. So it makes little sense to substitute a degree unit by a meter unit without proper reprojecting.

5
  • I'm a cookbook user for reprojection and the final format I need is Lat/Lon WGS84 to go into a GPS. Gdalinfo shows source datum is GDA94 but what is the source projection? Can I just project to UTM or Lambert conformal conical without knowing source and is there a preference? I probably don't want to try to write an ecw file. My understanding is gdalwarp ecw to Lambert CC GDA94 then to WGS84 Lat/Long. Kudos - your explanation of change in metres towards the poles is crystal clear, finally.
    – flywire
    Jul 22 '15 at 13:50
  • 1
    If your source data is in GDA94 in degrees, you need no further information on the source projection. You can freely reproject between any CRS that is valid in Australia, in any format GDAL can write to (ecw is read-only without license!).
    – AndreJ
    Jul 22 '15 at 15:19
  • Thinking this through I am starting to doubt my approach which is based on communication with language difficulties with someone in the Russian community near the polar regions where it is more of an issue. Keeping in mind I am trying to display in pixels on a Magellan eXplorist GPS screen which must surely be projecting degrees/pixel. I am thinking that projection in a format like Lamberts in metres will be lost when reprojected into the (UTM?) lat/lon WGS84. Assuming this is the case I understand I should reproject in degrees/pixel.
    – flywire
    Jul 22 '15 at 21:44
  • For polar regions there are special polar projections to avoid distortions. I have no experience with Magellan GPS, so I can't help on that topic.
    – AndreJ
    Jul 23 '15 at 5:11
  • Some Commonly Used Map Projections: "The Lambert Conformal Conic is the preferred projection for regional maps in mid-latitudes. In Australia the national mapping agency prefers to use this projection using 18° and 36° South as the two Standard Parallels. Projection information: Lambert Conformal Conic; centred on 140° East and 25° South, and two Standard Parallels 18° and 36° South." It appears that the default GPS projection is Geographic.
    – flywire
    Jul 23 '15 at 12:42

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.