[PROJ] Transformation failure -- valid?

Nyall Dawson nyall.dawson at gmail.com
Thu May 23 15:37:42 PDT 2019


On Tue, 21 May 2019 at 19:55, Even Rouault <even.rouault at spatialys.com> wrote:
>
> On mardi 21 mai 2019 16:51:48 CEST Nyall Dawson wrote:
> > Hi list,
> >
> > Another one from me. Attempting to reproject from WGS84 to web mercator:
> >
> > PJ* crs = proj_create_crs_to_crs( 0, "+proj=longlat +datum=WGS84
> > +no_defs", "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0
> > +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs")
> > PK* res = proj_normalize_for_visualization( 0, crs );
> >
> > Throws an error -61 when trying to reproject the coordinate -68.2 /
> > 70.8 using res.
> >
> > What am I missing?
>
> Works for me:

This was a silly error on my part -- I had some extra test code in
between creation of the crs and the proj_trans call which was raising
an error, and I'd omitted a call to proj_errno_reset to clear the
error afterwards. So the -61 error was actually coming from the
earlier call, and not the proj_trans one.

Nyall


More information about the PROJ mailing list