gdal icon indicating copy to clipboard operation
gdal copied to clipboard

Support GeoTIFF georeferencing Information

Open SunBlack opened this issue 1 month ago • 3 comments

Feature description

I am currently looking at how to read spatial references from a LAS file. This has developed over time (see current specification):

  • LAS 1.5 expects a WKT2 string
  • LAS 1.4 expects a WKT1 string
  • LAS 1.0-1.3 use the GeoTIFF notation

Here you can find a test file, containing a WKT1 string and the a GeoTIFF VLR at same time.

In principle, I would ignore the GeoTIFF variant, as it is prohibited from LAS 1.5 onwards anyway, but if we do receive old files, it would be nice if we could also read the values from LAS 1.0-1.3.

During my short search to determine whether GDAL or PROJ can parse this (in the test file, the value is, for example, PCS Name = NAD83_2011 / Nebraska (ft)|NAD83_2011 / Nebraska (ft)|ýýýý), I saw this code: https://github.com/OSGeo/gdal/blob/9f8a0ab341f9ec509a2cfc6a8fe30dc988b55eb9/frmts/gtiff/gt_citation.cpp#L158-L206

So it seems GDAL can write these information, but I didn't found the parser for this via GitHub Search. Can GDAL read this information back? If so, is the API generally usable for this purpose?

In the LASTools exists a parsing code for it, but just in an separate tool and not the LASlib directly. See here (called from here).

Additional context

No response

SunBlack avatar Nov 17 '25 15:11 SunBlack

@hobu Isn't that something that should/can be done with PDAL instead of GDAL ?

rouault avatar Nov 17 '25 15:11 rouault

PDAL can read this information (see here).

Since GDAL itself does not recognize the LAS format, I do not expect GDAL to be able to handle LAS-specific tasks. I was rather surprised that GDAL or the GeoTIFF library seems to be able to write the projection for the HFA format via ImagineCitationTranslation (even though I cannot find a call for it at the moment), but I cannot find the read function for it. Since this seems to be something specific to GeoTIFF, the question was whether the GeoTIFF library should be able to read/write it and GDAL could pass on the method. Then PDAL, which GDAL needs, could also use GDAL's method.

SunBlack avatar Nov 18 '25 14:11 SunBlack

So it seems GDAL can write these information

no, this code is the parser. GDAL doesn't write that information. The parser sets the appropriate parts of the SRS object from it.

rouault avatar Nov 18 '25 14:11 rouault

Closing as it is not clear to me that any change in GDAL is needed

rouault avatar Dec 16 '25 23:12 rouault