Opened 13 years ago
Last modified 9 years ago
#3986 closed enhancement
gdal_translate: XYZ driver flips image vertically — at Initial Version
Reported by: | hkohr | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | 1.8.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
Using the XYZ driver directly and a detour via CSV import and interpolation produces different results: the XYZ flips the image vertically.
Steps to reproduce:
With XYZ driver
Statistics:
kohr@iam-ma-023 ~/dgm_test $ gdalinfo -stats -nomd test.xyz Driver: XYZ/ASCII Gridded XYZ Files: test.xyz Size is 501, 501 Coordinate System is `' Origin = (2585299.500000000000000,5457199.500000000000000) Pixel Size = (1.000000000000000,1.000000000000000) Corner Coordinates: Upper Left ( 2585299.500, 5457199.500) Lower Left ( 2585299.500, 5457700.500) Upper Right ( 2585800.500, 5457199.500) Lower Right ( 2585800.500, 5457700.500) Center ( 2585550.000, 5457450.000) Band 1 Block=501x1 Type=Float32, ColorInterp=Undefined Minimum=235.211, Maximum=355.767, Mean=286.486, StdDev=37.135
Translation to GeoTiff:
kohr@iam-ma-023 ~/dgm_test $ gdal_translate -of GTiff -ot byte -scale 235 356 test.xyz test_xyz.tiff
With gridded data
Using QGis -> CSV import -> interpolation -> output:test.tin
Statistics:
kohr@iam-ma-023 ~/dgm_test $ gdalinfo -stats -nomd test.tin Driver: AAIGrid/Arc/Info ASCII Grid Files: test.tin Size is 500, 500 Coordinate System is `' Origin = (2585300.000000000000000,5457700.000000000000000) Pixel Size = (1.000000000000000,-1.000000000000000) Corner Coordinates: Upper Left ( 2585300.000, 5457700.000) Lower Left ( 2585300.000, 5457200.000) Upper Right ( 2585800.000, 5457700.000) Lower Right ( 2585800.000, 5457200.000) Center ( 2585550.000, 5457450.000) Band 1 Block=500x1 Type=Float32, ColorInterp=Undefined Minimum=235.260, Maximum=355.607, Mean=286.440, StdDev=37.055 NoData Value=-9999
Translation to GeoTiff:
kohr@iam-ma-023 ~/dgm_test $ gdal_translate -of GTiff -ot byte -scale 235 356 test.tin test_tin.tiff
Change History (3)
by , 13 years ago
Attachment: | test_tin.tiff added |
---|
by , 13 years ago
Attachment: | test_xyz.tiff added |
---|
by , 13 years ago
Attachment: | hillshade.tiff added |
---|
Note:
See TracTickets
for help on using tickets.
Hillshading image from the original dataset