Otto -

The first question -

I you look at the information from "ogrinfo" in the first case it contains:

... DATUM["unknown", SPHEROID["unretrievable - using WGS84",6378137,298.257223563], ...

This is plainly wrong for EPSG:25833. It should be something with GRS80. You might have a bad installation of the GDAL utilities. And this error is probably triggering QGIS to ask for the projection.

For the next question: I haven't actually looked at the QGIS code for CRS lookups, but I'll make a guess: QGIS do a search in the build-in projection database and find the epgs:3006 as the first candidate and doesn't look any further. You might have a look on this thread: http://lists.osgeo.org/pipermail/qgis-user/2013-February/021233.html , which describes a somewhat similar situation

Regards
Bo Victor Thomsen
AestasGIS
Denmark

On 22-05-2015 09:42, Otto Dassau wrote:
Hi,

I would like to understand QGIS behavior a little better for CRS handling.

I have a tif/tfw file (input.tif) and would like to create compressed geotiff
tiles from it (output.tif).

1) When I use

gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES \
  -a_srs EPSG:25833 input.tif output.tif

gdalinfo shows:

Driver: GTiff/GeoTIFF
Files: output.tif
Size is 16100, 15300
Coordinate System is:
LOCAL_CS["ETRS89 / UTM zone 33N",
     GEOGCS["ETRS89",
         DATUM["unknown",
             SPHEROID["unretrievable - using WGS84",6378137,298.257223563],
             TOWGS84[0,0,0,0,0,0,0]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433]],
     AUTHORITY["EPSG","25833"],
     UNIT["metre",1]]
[...]

loading this file in QGIS I am asked to provide the CRS for the layer,
although it should be written in the GeoTiff header.

2) When I use

gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES \
  -a_srs "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m \
  +no_defs" input.tif output.tif

gdalinfo shows:

Driver: GTiff/GeoTIFF
Files: output.tif
Size is 16100, 15300
Coordinate System is:
PROJCS["UTM Zone 33, Northern Hemisphere",
     GEOGCS["GRS 1980(IUGG, 1980)",
         DATUM["unknown",
             SPHEROID["GRS80",6378137,298.257222101],
             TOWGS84[0,0,0,0,0,0,0]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",0],
     PARAMETER["central_meridian",15],
     PARAMETER["scale_factor",0.9996],
     PARAMETER["false_easting",500000],
     PARAMETER["false_northing",0],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]]]


loading this file in QGIS, I am *not* asked to provide the CRS for the
layer, but QGIS assigns the wrong CRS. In my case I want EPSG 25833 but get
EPSG 3006 (which has the same parameters as 25833, but is not what I want).

How can I make QGIS read the CRS correctly? Does anybody has a solution for
this?

Thanks a lot
Otto
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to