My problem:
I'm currently trying to use gdal
to write GeoTIFF files. I'm however having problems with using a proj4 string to describe the projection. ("+proj=lcc +k_0=0.001 +lat_1=46 +lat_2=49 +lat_0=47.5 +lon_0=13.333333 +ellps=bessel +x_0=400 +y_0=400 +no_defs"). Essentially the scaling factor "+k_0" is ignored by gdal.
I know that instead of +k_0
, I can use dataset->SetGeoTransform(adfGeoTransform)
(in C++) and set this value manually. However I am surprised that doing this via the proj4 string does not seem to be possible.
If you try the following in python:
Example:
from gdal import osr
p = osr.SpatialReference()
p.ImportFromProj4("+proj=lcc +k_0=0.001 +lat_1=46 +lat_2=49 +lat_0=47.5 +lon_0=13.333333 +ellps=bessel +x_0=400 +y_0=400 +no_defs")
print p.ExportToProj4()
the output simply drops the +k_0
parameter:
+proj=lcc +lat_1=46 +lat_2=49 +lat_0=47.5 +lon_0=13.333333 +x_0=400 +y_0=400 +ellps=bessel +units=m +no_defs
This results in completely different projected coordinates however and makes it difficult to rely onto.