3

I'm trying to add tpers projection as a custom projection in QGIS 2.10.1

In the Custom crs dialog I'm adding the proj.4 text:

+proj=tpers +h=500000000 +lat_0=19 +lon_0=99 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m

And when I test with some North and East values, QGIS calculates some output coordinates. The thing is that, when I click done, QGIS complains that The proj4 definition of 'tpers' is not valid.

I've read this answer but I think that the tpers definition must be outdated since it produces error when I try to test it in the custom crs dialog.

The proj.4 string I'm using comes from here

4
  • 1
    There is a difference in the Proj.4 and MapProjectionViewer.. proj says you need tilt and azi but the viewer has neither (+proj=tpers +h=500000000 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m), the tilt (+tilt=%f) and azimuth (+azi=%f) parameters are missing. Commented Sep 4, 2015 at 0:32
  • @MichaelMiles-Stimson Basically, you are right, but it does not solve the error. Even ogr2ogr fails with ogr2ogr -t_srs "+proj=tpers +lat_0=10 +lon_0=10 +h=10000 +tilt=10 +azi=10" tilt.shp test.shp. And gdalsrsinfo does not like it either.
    – AndreJ
    Commented Sep 4, 2015 at 5:18
  • Strangely, cs2cs +init=epsg:4326 +to +proj=tpers +h=500000.000 +lat_0=19 +lon_0=19 +x_0=0 +y_0=0 +azi=10 +tilt=10 +R=6371000 +units=m wgs.txt >tilt.txt works.
    – AndreJ
    Commented Sep 4, 2015 at 6:09
  • @MichaelMiles-Stimson I also noticed the mismatch but oddly enough, QGIS seemed to like better the MapProjectionViewer version
    – plablo09
    Commented Sep 4, 2015 at 14:29

1 Answer 1

4

According to this ticket: https://trac.osgeo.org/gdal/ticket/3404 the tilted perspective projection is not added to GDAL (but is in Proj.4).

That is why GDAL/OGR based programmes like ogr2ogr, gdalsrsinfo and QGIS can not understand it, while cs2cs (based on pure Proj.4) and the testing suite of QGIS can work with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.