Hello Johannes,
I added the GDAL information for both files as an attachment. My steps for
creating the exported file were:
1. Open GeoTiff with QGIS.
2. Right-click on the layer of this GeoTiff.
3. Choose the option “Export -> Save As...".
4. Options:
* Output mode: raw data
* Format: GeoTiff
* CRS: The same as the original file.
* Extent: Taken from the current layer.
* Resolution: taken from the current layer.
* Create Options: Disabled
* Pyramids: Disabled
Kind regards,
i.A. Dirk Stulgies
**********************************
[cid:[email protected]]
NPZ Innovation GmbH
Hohenlieth-Hof, D-24363 Holtsee
Tel. +49-4351-736 277 <tel:%2B49-4351-736%20277>
Fax +49-4351-736 271<tel:%2B49-4351-736%20271>
Mail: [email protected]<mailto:[email protected]>
Web: www.npz-innovation.de<http://www.npz-innovation.de/>
Firmensitz Hohenlieth, Holtsee
Amtsgericht Kiel, HRB 15342 Kl
Geschäftsführer: Dr. Gunhild Leckband, Thorsten Pommer
Von: Johannes Kröger (WhereGroup) <[email protected]>
Gesendet: Donnerstag, 5. Oktober 2023 11:57
An: Stulgies Dirk <[email protected]>; [email protected]
Betreff: Re: [Qgis-user] Unexpected change in pixel values during processing
(Metashape/QGIS)
ACHTUNG: Diese E-Mail stammt von außerhalb der NPZ. Klicken sie auf keine Links
und öffnen sie keine Anhänge außer sie erwarten diese und sie sind sich sicher,
dass der Inhalt ungefährlich ist.
Hi Dirk,
there is no such thing as "just exporting". What exactly do you do? What does
gdalinfo say about the original file and the exported file?
Cheers, Hannes
Am 05.10.23 um 10:10 schrieb Stulgies Dirk via QGIS-User:
# Unexpected change in pixel values during processing (Metashape/QGIS)
## Software
* QGIS 3.28
* Agisoft Metashape 2.0.1
## Description
I used Agisoft Metashape to create RGB GeoTiff. The source for this GeoTiff are
images taken with a UAV (DJI M3M).
When loading the GeoTiff into QGIS and processing the file, the pixel values
for the same position differ between the original file and the process result.
My first thought was that I somehow resampled, converted, or transformed the
pixel values during the processing.
So I simplified the process step by step to the bare minimum, but the result
stayed the same.
Even just exporting the file leads to changed pixel values.
## CRS not recognized
Something I noticed while trying to solve this problem is that QGIS doesn't
recognize the GeoTiffs CRS (EPSG:32632) as a predefined CRS but as a custom
CRS. This is curious because I use a predefined CRS from Agisoft Metashape to
create the GeoTiff.
I tried to reproject the file and also to just change the CRS in the file's
QGIS properties, but the pixel values still differ after processing the file.
### CRS defined in Agisoft Metashape:
```
Projected Coordinate System: WGS 84 / UTM zone 32N (EPSG::32632)
Linear Units: metre (EPSG::9001)
Projection Method: Transverse Mercator
Latitude of natural origin: 0
Longitude of natural origin: 9
Scale factor at natural origin: 0.9996
False easting: 500000
False northing: 0
Geographic Coordinate System: WGS 84 (EPSG::4326)
Angular Units: degree (EPSG::9102)
Geodetic Datum: World Geodetic System 1984 ensemble (EPSG::6326)
Ellipsoid: WGS 84 (EPSG::7030)
Prime Meridian: Greenwich (EPSG::8901)
```
### CRS regognized in QGIS:
```
BOUNDCRS[
SOURCECRS[
PROJCRS[
"WGS 84 / UTM zone 32N",
BASEGEOGCRS[
"WGS 84",
DATUM[
"World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]
],
PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]
],
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",32632]
]
],
TARGETCRS[
GEOGCRS[
"WGS 84",
DATUM[
"World Geodetic
System 1984",
ELLIPSOID["WGS
84",6378137,298.257223563,LENGTHUNIT["metre",1]]
],
PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude
(Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude
(Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]
]
],
ABRIDGEDTRANSFORMATION[
"Transformation from WGS 84 to WGS84",
METHOD["Position Vector transformation (geog2D
domain)",ID["EPSG",9606]],
PARAMETER["X-axis
translation",0,ID["EPSG",8605]],
PARAMETER["Y-axis
translation",0,ID["EPSG",8606]],
PARAMETER["Z-axis
translation",0,ID["EPSG",8607]],
PARAMETER["X-axis rotation",0,ID["EPSG",8608]],
PARAMETER["Y-axis rotation",0,ID["EPSG",8609]],
PARAMETER["Z-axis rotation",0,ID["EPSG",8610]],
PARAMETER["Scale difference",1,ID["EPSG",8611]]
]
]
```
## Question
The questions I have are:
1. What could be the reason for this behavior?
2. How do I prevent the pixel values from changing?
Kind regards,
i.A. Dirk Stulgies
**********************************
[cid:[email protected]]
NPZ Innovation GmbH
Hohenlieth-Hof, D-24363 Holtsee
Tel. +49-4351-736 277 <tel:%2B49-4351-736%20277>
Fax +49-4351-736 271<tel:%2B49-4351-736%20271>
Mail: [email protected]<mailto:[email protected]>
Web: www.npz-innovation.de<http://www.npz-innovation.de/>
Firmensitz Hohenlieth, Holtsee
Amtsgericht Kiel, HRB 15342 Kl
Geschäftsführer: Dr. Gunhild Leckband, Thorsten Pommer
________________________________
This email was scanned by Bitdefender
_______________________________________________
QGIS-User mailing list
[email protected]<mailto:[email protected]>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
--
Johannes Kröger / GIS-Entwickler/-Berater
---------------------------------------------
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com<http://www.foss-academy.com>
---------------------------------------------
WhereGroup GmbH
c/o KK03 GmbH
Lange Reihe 29
20099 Hamburg
Germany
Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11
[email protected]<mailto:[email protected]>
www.wheregroup.com<http://www.wheregroup.com>
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
-------------------------------
________________________________
This email was scanned by Bitdefender
Driver: GTiff/GeoTIFF
Files: D:/GIS/20230829_Lembke_Hauskoppel_M3M_RGB.tif
Size is 23620, 24629
Coordinate System is:
BOUNDCRS[
SOURCECRS[
PROJCRS["WGS 84 / UTM zone 32N",
BASEGEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]],
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",32632]]],
TARGETCRS[
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["latitude",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["longitude",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]],
ABRIDGEDTRANSFORMATION["Transformation from WGS 84 to WGS84",
METHOD["Position Vector transformation (geog2D domain)",
ID["EPSG",9606]],
PARAMETER["X-axis translation",0,
ID["EPSG",8605]],
PARAMETER["Y-axis translation",0,
ID["EPSG",8606]],
PARAMETER["Z-axis translation",0,
ID["EPSG",8607]],
PARAMETER["X-axis rotation",0,
ID["EPSG",8608]],
PARAMETER["Y-axis rotation",0,
ID["EPSG",8609]],
PARAMETER["Z-axis rotation",0,
ID["EPSG",8610]],
PARAMETER["Scale difference",1,
ID["EPSG",8611]]]]
Data axis to CRS axis mapping: 1,2
Origin = (557682.726557903690264,6030394.147337971255183)
Pixel Size = (0.003665548730431,-0.003665548730437)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
COMPRESSION=LZW
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 557682.727, 6030394.147) ( 9d53'20.14"E, 54d25' 4.80"N)
Lower Left ( 557682.727, 6030303.869) ( 9d53'20.07"E, 54d25' 1.88"N)
Upper Right ( 557769.307, 6030394.147) ( 9d53'24.94"E, 54d25' 4.77"N)
Lower Right ( 557769.307, 6030303.869) ( 9d53'24.88"E, 54d25' 1.85"N)
Center ( 557726.017, 6030349.008) ( 9d53'22.51"E, 54d25' 3.32"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
Overviews: 11810x12315, 5905x6158, 2953x3079, 1477x1540, 739x770, 370x385, 185x193
Unit Type: metre
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
Overviews: 11810x12315, 5905x6158, 2953x3079, 1477x1540, 739x770, 370x385, 185x193
Unit Type: metre
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
Overviews: 11810x12315, 5905x6158, 2953x3079, 1477x1540, 739x770, 370x385, 185x193
Unit Type: metreDriver: GTiff/GeoTIFF
Files: D:\20230829_Lembke_Hauskoppel_M3M_exported.tif
Size is 23620, 24629
Coordinate System is:
PROJCRS["WGS 84 / UTM zone 32N",
BASEGEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]],
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["(E)",east,
ORDER[1],
LENGTHUNIT["metre",1]],
AXIS["(N)",north,
ORDER[2],
LENGTHUNIT["metre",1]],
USAGE[
SCOPE["Navigation and medium accuracy spatial referencing."],
AREA["Between 6°E and 12°E, northern hemisphere between equator and 84°N, onshore and offshore. Algeria. Austria. Cameroon. Denmark. Equatorial Guinea. France. Gabon. Germany. Italy. Libya. Liechtenstein. Monaco. Netherlands. Niger. Nigeria. Norway. Sao Tome and Principe. Svalbard. Sweden. Switzerland. Tunisia. Vatican City State."],
BBOX[0,6,84,12]],
ID["EPSG",32632]]
Data axis to CRS axis mapping: 1,2
Origin = (557682.726600000052713,6030394.147300000302494)
Pixel Size = (0.003665546147331,-0.003665548743369)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 557682.727, 6030394.147) ( 9d53'20.14"E, 54d25' 4.80"N)
Lower Left ( 557682.727, 6030303.868) ( 9d53'20.07"E, 54d25' 1.88"N)
Upper Right ( 557769.307, 6030394.147) ( 9d53'24.94"E, 54d25' 4.77"N)
Lower Right ( 557769.307, 6030303.868) ( 9d53'24.88"E, 54d25' 1.85"N)
Center ( 557726.017, 6030349.008) ( 9d53'22.51"E, 54d25' 3.32"N)
Band 1 Block=23620x1 Type=Byte, ColorInterp=Red
Band 2 Block=23620x1 Type=Byte, ColorInterp=Green
Band 3 Block=23620x1 Type=Byte, ColorInterp=Blue_______________________________________________
QGIS-User mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user