1

I'm using the OpenTripPlanner routing engine (v1.4), and am trying to load in elevation information via a GeoTIFF file. When I load in my TIF file though, the elevations are always being set to 0.

The TIF file I'm using is from Digital Elevation Model (DEM) of Australia, titled "Download 5m DEM GDA94 UTM zone 55 NSW QLD TAS VIC Quasigeoid (6.1GB)". When I debug the code, in ElevationModule.getElevation the line coverage.evaluate(new DirectPosition2D(GeometryUtils.WGS84_XY, x, y), values); always throws a PointOutsideCoverageException, causing the elevation at that point to be set to 0.

If however I try on a different GeoTIFF from the same site e.g. "Download 5m DEM GDA94 UTM zone 48 Christmas Island (17MB)" then it works fine, I get elevation as expected.

This is the first time I'm dipping my toes into the GIS world, so I'm not clear on all the nomenclature around formats etc. From what I have tried looking at using gdalinfo, the details of each TIFF are as follows:

DEM GDA94 UTM zone 55 NSW QLD TAS VIC Quasigeoid (NOT WORKING)

Driver: GTiff/GeoTIFF
Files: mdbaz55_qg.tif
Size is 118601, 182001
Coordinate System is:
PROJCS["GDA_1994_MGA_Zone_55",
    GEOGCS["GDA94",
        DATUM["Geocentric_Datum_of_Australia_1994",
            SPHEROID["GRS 1980",6378137,298.2572221010042,
                AUTHORITY["EPSG","7019"]],
            AUTHORITY["EPSG","6283"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4283"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",147],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","28355"]]
Origin = (210999.000000000000000,6901005.000000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  210999.000, 6901005.000) (144d 3'42.56"E, 27d59' 5.19"S)
Lower Left  (  210999.000, 5991000.000) (143d47'11.44"E, 36d10'57.71"S)
Upper Right (  804004.000, 6901005.000) (150d 5'25.91"E, 27d58'53.16"S)
Lower Right (  804004.000, 5991000.000) (150d22'48.21"E, 36d10'41.18"S)
Center      (  507501.500, 6446002.500) (147d 4'46.29"E, 32d 7'20.37"S)
Band 1 Block=128x128 Type=Float32, ColorInterp=Gray
  NoData Value=-3.40282299999999995e+38
  Metadata:
    RepresentationType=ATHEMATIC

DEM GDA94 UTM zone 48 Christmas Island (WORKING)

Driver: GTiff/GeoTIFF
Files: christmasislandz48.tif
Size is 4200, 3600
Coordinate System is:
PROJCRS["GDA94 / MGA zone 48",
    BASEGEOGCRS["GDA94",
        DATUM["Geocentric Datum of Australia 1994",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]],
            ID["EPSG",6283]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433,
                ID["EPSG",9122]]]],
    CONVERSION["Transverse Mercator",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",105,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",0.9996,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",500000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",10000000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["easting",east,
            ORDER[1],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]],
        AXIS["northing",north,
            ORDER[2],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]]]
Data axis to CRS axis mapping: 1,2
Origin = (558000.000000000931323,8849000.000000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  DataType=Generic
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  558000.000, 8849000.000) (105d31'47.61"E, 10d24'42.75"S)
Lower Left  (  558000.000, 8831000.000) (105d31'48.61"E, 10d34'28.80"S)
Upper Right (  579000.000, 8849000.000) (105d43'18.27"E, 10d24'41.40"S)
Lower Right (  579000.000, 8831000.000) (105d43'19.63"E, 10d34'27.43"S)
Center      (  568500.000, 8840000.000) (105d37'33.53"E, 10d29'35.15"S)
Band 1 Block=128x128 Type=Float32, ColorInterp=Gray
  NoData Value=-3.40282306073709653e+38

The code for OTP makes mention a lot of "WGS84_XY", and the fact that coordinates must be in long,lat format, not lat,long. Is there a GDAL command I can run to either:

  1. Validate if coordinates are in long,lat format?
  2. Validate if the TIFF supports this WGS84_XY?
  3. Somehow convert a TIFF file to say "please convert my incompatible.tif to a new TIFF using the same format as my working.tif file"?

1 Answer 1

0

I am not familliar with your coordinate system, but for my region the solution was to convert local coordinate system to WGS 84 - EPSG code: 4326.

I did the conversion in QGIS using Warp(reproject) tool which is derived from the GDAL warp utility. Choose int16 as output data type and .tif extension for reprojected output raster layer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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