[gdal-dev] Can't read get a spatial reference from Geotiffs exported from QGIS (c++ API)

Even Rouault even.rouault at spatialys.com
Wed Apr 22 07:36:21 PDT 2020


On mercredi 22 avril 2020 12:35:23 CEST Craig Delancy wrote:
> Hello.
> 
> I am building an application around GDAL using the C++ API, but I have ran
> into a snag. Normally, after using GDAL Open on a Geotiff file, I am able
> to get a spatial reference containing all the information I need about the
> projection. However, when I try to get a spatial reference from a Geotiff
> that was specifically exported from QGIS, it is always NULL.
> 
> Does anyone know why this is or have suggestions for me to look into?
> So far, the only files like this are specifically from QGIS, which is
> strange to me.

Does gdalinfo report the right SRS ?

I'm wondering if QGIS didn't export a side car file in some circumstances, with projection info 
(.qpj or whatever), that was specific to it, and thus would explain GDAL doesn't see it. But I'm 
pretty sure you must have options to create a real geotiff file with georeferencing 
embedded into it.

Just attach an example of / link to a (small) file (and possibly associated side car files) that 
exhibit the issue

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200422/5e45f580/attachment.html>


More information about the gdal-dev mailing list