[OpenLayers-Users] proj4js question

Patrick Valsecchi patrick.valsecchi at camptocamp.com
Wed Jul 23 08:55:43 EDT 2008


On Wednesday 23 July 2008 14.46:22 bartvde at osgis.nl wrote:
> I am transforming a geometry from EPSG:28992 to EPSG:4326, and after that
> to EPSG:23031. In the last step the geometry does not transform anymore.
>
>         if (point.transformed) {
>           this.log("point already transformed");
>           return;
>         }
>
> Apparently proj4js thinks the point has already been transformed.
>
> Who is responsible for managing the transformed property? Since it does
> not seem possible to reproject geometries more than once currently?

Hi,

Just do that before the second transformation:
  delete point.transformed

And you'll be good to go.

I don't know why proj4j changes the passed object instead of creating a new 
one. It's a strange design decision, but it's like that...

CU



More information about the Users mailing list