[OpenLayers-Users] proj4js question

bartvde at osgis.nl bartvde at osgis.nl
Wed Jul 23 09:04:44 EDT 2008


Hi Patrick,

I am using the transform function of OpenLayers, which in its turn calls
proj4js, should it change the transformed property for all the points in a
geometry in your opinion? That does not seem effective does it?

Best regards,
Bart

> 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
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>





More information about the Users mailing list