[Geotiff] Encoded projection using GTIFSetFromProj4 are specified as USER-DEFINED
Kilian Demeulemeester
kilian.demeulemeester at yellowscan-lidar.com
Tue Feb 16 01:01:03 PST 2021
Hi everyone,
I am willing to write down geotiff files.
For instance, i'd like to encode the projection info |EPSG:25831|.
In order to write down the projection in the geotiff, I am using
|GTIFSetFromProj4(gtif, proj4String)|.
In order to use this method, I first convert |EPSG:25831| to it's proj4
equivalent via the method |proj_as_proj_string| (proj library)
This convert |EPSG:25831| to |+proj=utm +zone=32 +datum=WGS84 +units=m
+no_defs +type=crs|
The encoded information are the following;:
|Geotiff_Information: Version: 1 Key_Revision: 1.0 Tagged_Information:
ModelTiepointTag (2,3): 0 0 0 571239.5625 4845679 0 ModelPixelScaleTag
(1,3): 2 2 0 End_Of_Tags. Keyed_Information: GTModelTypeGeoKey
(Short,1): ModelTypeProjected GeographicTypeGeoKey (Short,1):
User-Defined GeogGeodeticDatumGeoKey (Short,1): User-Defined
GeogEllipsoidGeoKey (Short,1): Ellipse_GRS_1980 ProjectedCSTypeGeoKey
(Short,1): User-Defined ProjectionGeoKey (Short,1): User-Defined
ProjCoordTransGeoKey (Short,1): CT_TransverseMercator
ProjLinearUnitsGeoKey (Short,1): Linear_Meter ProjNatOriginLongGeoKey
(Double,1): 3 ProjNatOriginLatGeoKey (Double,1): 0
ProjFalseEastingGeoKey (Double,1): 500000 ProjFalseNorthingGeoKey
(Double,1): 0 ProjScaleAtNatOriginGeoKey (Double,1): 0.9996 End_Of_Keys.
End_Of_Geotiff. |
Unfortunately, in QGIS (my version is QGIS 3.6), the detected CRS is a
"generated CRS" and not "EPSG:25831".
What I am doing wrong? Most of the time, our user will choose the
projection from the EPSG database, so I always have the EPSG code
available if needed.
I am using proj7 and libgeotiff 6.0.
Thank you very much
Kilian
Kilian Demeulemeester
Software Project Lead - R&D
[https://yellowscan-lidar.com/]
525 Avenue Saint Sauveur du Pin
34980 Saint-Clément-De-Rivière - France
Tel: +33 (0)4 11 93 14 06
yellowscan-lidar.com [https://yellowscan-lidar.com/]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotiff/attachments/20210216/ad0283d9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x-disclaimer-534644925-0.png
Type: image/png
Size: 1125 bytes
Desc: x-disclaimer-534644925-0.png
URL: <http://lists.osgeo.org/pipermail/geotiff/attachments/20210216/ad0283d9/attachment.png>
More information about the Geotiff
mailing list