[Qgis-user] QgsCsException - Error: acos/asin: |arg| >1.+1e-14
Andre Joost
andre+joost at nurfuerspam.de
Tue Nov 1 06:01:54 PDT 2016
Am 31.10.2016 um 12:03 schrieb Tom Chadwin:
> Someone using qgis2web has experienced the following error:
>
> QgsCsException: forward transform of
> (-18933215.197392, -9254444.351822)
> PROJ.4: +proj=moll +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs
> +ellps=WGS84 +towgs84=0,0,0 +to +proj=longlat +datum=WGS84 +no_defs
> +ellps=WGS84 +towgs84=0,0,0
> Error: acos/asin: |arg| >1.+1e-14
>
> What causes the error? The QGIS project is in EPSG:54009, and either export
> to 3857 or to 54009 gives the error above.
>
The reason lies in the oddity of the Mollweide projection. At full size,
large parts of the image can be reprojected to a point on the Earth.
Using gdalwarp, this command line will work:
gdalwarp -overwrite -s_srs EPSG:53009 -t_srs EPSG:3857 infile outfile
-wo SOURCE_EXTRA=1000
But with On-The-fly-reprojections you can not enter the SOURCE_EXTRA.
If you need a full Earth view, you have to stick to EPSG:4326 or 3857.
BTW Sphere Mollweide EPSG:53009 works far better than World Mollweide
EPSG:54009 when it comes to reprojections.
HTH,
André Joost
More information about the Qgis-user
mailing list