<html>
 <head> 
  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 
 </head> 
 <body> 
  <p>Hi everyone,<br> </p> 
  <p>I am willing to write down geotiff files.</p> 
  <p>For instance, i'd like to encode the projection info <code>EPSG:25831</code>.</p> 
  <p>In order to write down the projection in the geotiff, I am using <code>GTIFSetFromProj4(gtif, proj4String)</code>.</p> 
  <p>In order to use this method, I first convert <code>EPSG:25831</code> to it's proj4 equivalent via the method <code>proj_as_proj_string</code> (proj library)</p> 
  <p>This convert <code>EPSG:25831</code> to <code>+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +type=crs</code></p> 
  <p>The encoded information are the following;:</p> 
  <pre><code>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.
</code></pre> 
  <p>Unfortunately, in QGIS (my version is QGIS 3.6), the detected CRS is a "generated CRS" and not "EPSG:25831".</p> 
  <p>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.</p> 
  <p>I am using proj7 and libgeotiff 6.0.</p> 
  <p>Thank you very much</p> 
  <p>Kilian<br> </p>   
  <div class="x-disclaimer-534644925">   
   <table style="font: 13px/16px Arial, Helvetica, sans-serif; height: 156px; width: 446px; color: black;" width="450"> 
    <tbody> 
     <tr> 
      <td style="border-bottom: 3px solid #f9b200; height: 60px; width: 442px; vertical-align: bottom;" colspan="2"> <p style="text-align: left;"><strong style="font-size: 15px;">Kilian Demeulemeester<em></em></strong><br>Software Project Lead - R&D</p> </td> 
     </tr> 
     <tr> 
      <td style="padding: 0px 0px; width: 168.367px; vertical-align: top;"> <p><a href="https://yellowscan-lidar.com"><img src="cid:x-disclaimer-534644925-0.png@bm-disclaimer" alt="logo_Yellowscan" width="168" height="41"></a></p> </td> 
      <td style="padding: 0px 0px; width: 274.633px; vertical-align: top;"> <p style="text-align: right;">525 Avenue Saint Sauveur du Pin<br>34980 Saint-Clément-De-Rivière - France<br>Tel: +33 (0)4 11 93 14 06<br><a style="color: #e99500; text-decoration: none; font-size: 15px; font-weight: bold;" href="https://yellowscan-lidar.com"><span style="color: #e99500;">yellowscan-lidar.com</span></a></p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <table style="border-collapse: collapse; width: 450px;"> 
    <tbody> 
     <tr> 
      <td style="text-align: center;"><a title="Discover the new YellowScan Mapper UAV LiDAR solution" href="https://www.yellowscan-lidar.com/products/mapper-3/?utm_source=email_signature&utm_medium=email&utm_campaign=mapper_banner"><img style="float: left;" src="https://www.yellowscan-lidar.com/wp-content/uploads/2020/10/email-banner.jpg" alt="" width="443" height="80"></a></td> 
     </tr> 
    </tbody> 
   </table>  
  </div>
 </body>
</html>