TransWikia.com

Converting coordinate system produces distorted image

Geographic Information Systems Asked by a.grochmal on August 6, 2021

I have a GeoTIFF file produced from a LAZ file. I would like to convert its coordinate system to the WGS84. However, after the conversion the resulting image is skewed (has a perspective distortion).

I would like to know why changing a coordinate system of a geospatial data is not a conformal map, even at such small areas (see example below)? Perhaps I do not convert coordinate system in the right way. If so how can I convert my GeoTIFF file into the WGS84 coordinate system?

My input file is dtm_max.tif. Here is its gdalinfo dtm_max.tif output:

Driver: GTiff/GeoTIFF
Files: dtm_max.tif
Size is 2001, 2001
Coordinate System is:
PROJCRS["ETRS89 / UTM zone 32N",
    BASEGEOGCRS["ETRS89",
        DATUM["European Terrestrial Reference System 1989",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4258]],
    CONVERSION["UTM zone 32N",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",9,
            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",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["easting",east,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["northing",north,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    ID["EPSG",25832]]
Data axis to CRS axis mapping: 1,2
Origin = (316999.510000000009313,5643000.169999999925494)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  316999.510, 5643000.170) (  6d23'48.83"E, 50d54'34.58"N)
Lower Left  (  316999.510, 5641999.670) (  6d23'50.64"E, 50d54' 2.22"N)
Upper Right (  318000.010, 5643000.170) (  6d24'40.01"E, 50d54'35.71"N)
Lower Right (  318000.010, 5641999.670) (  6d24'41.81"E, 50d54' 3.36"N)
Center      (  317499.760, 5642499.920) (  6d24'15.32"E, 50d54'18.97"N)
Band 1 Block=2001x1 Type=Float64, ColorInterp=Gray
  Description = max
  NoData Value=-9999
  Unit Type: metre

I convert its coordinate system with the following command:

gdalwarp dtm_max.tif temp.tif -t_srs "+proj=longlat +ellps=WGS84"

Resulting file has the following gdalinfo temp.tif:

Driver: GTiff/GeoTIFF
Files: temp.tif
Size is 2438, 1542
Coordinate System is:
GEOGCRS["unknown",
    DATUM["Unknown_based_on_WGS84_ellipsoid",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1],
            ID["EPSG",7030]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433,
            ID["EPSG",9122]]],
    CS[ellipsoidal,2],
        AXIS["latitude",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433,
                ID["EPSG",9122]]],
        AXIS["longitude",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433,
                ID["EPSG",9122]]]]
Data axis to CRS axis mapping: 2,1
Origin = (6.396897712607153,50.909920602210548)
Pixel Size = (0.000006035665741,-0.000006035665741)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (   6.3968977,  50.9099206) (  6d23'48.83"E, 50d54'35.71"N)
Lower Left  (   6.3968977,  50.9006136) (  6d23'48.83"E, 50d54' 2.21"N)
Upper Right (   6.4116127,  50.9099206) (  6d24'41.81"E, 50d54'35.71"N)
Lower Right (   6.4116127,  50.9006136) (  6d24'41.81"E, 50d54' 2.21"N)
Center      (   6.4042552,  50.9052671) (  6d24'15.32"E, 50d54'18.96"N)
Band 1 Block=2438x1 Type=Float64, ColorInterp=Gray
  Description = max
  NoData Value=-9999
  Unit Type: metre

Here is the hillshade image of dtm_max.tif file in the original coordinate system. Note the rectangular pond with a right angle indicated:
hillshade image of dtm_max.tif

Here is the hillshade image of temp.tif file in the WGS84 coordinate system. The corner of the pond is no longer 90 degrees.
hillshade image of temp.tif

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP