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

Andreas Oxenstierna ao at t-kartor.se
Wed Apr 22 08:14:55 PDT 2020


QGIS can certainly export valid GeoTIFFs.
But the checkbox "Add georef info" must be checked.
Which SRS is you trying to export?

To my knowledge, qpj is only created for vector data. "Identical" with 
the ESRI prj file

> 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
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Best Regards

Andreas Oxenstierna
T-Kartor Geospatial AB
Olof Mohlins väg 12 Kristianstad
mobile: +46 733 206831
mailto: ao at t-kartor.se
http://www.t-kartor.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200422/fbf4662b/attachment.html>


More information about the gdal-dev mailing list