[OpenLayers-Users] proj4js question

Chris Adams chris at genieknows.com
Wed Jul 23 13:14:33 EDT 2008


Christopher Schmidt wrote:
> On Wed, Jul 23, 2008 at 10:15:43AM -0400, Mike Adair wrote:
>   
>> Yes that check was put in there for the case where the last point in a 
>> polygon is the same object as the first one to prevent it from getting 
>> transformed again.  It is safe to remove that, but that also means 
>> application logic will have to account for it for polygons, i.e. loop 
>> over coordinates array length minus 1.
>>     
>
> OpenLayers does this appropriately, for what it's worth, though I'll
> admit it took a couple times of doing it wrong to get it right :)
>
>   
>> It seems like that is causing more trouble than it is worth and I will 
>> remove it when I prepare a 1.0 version of Proj4js.
>>     
>
> Cool, thanks.
>
> Regards,
>   
Isn't it possible to store the EPSG code of the current projection, and 
only project if the new code is different? When initialized, it could -1 
perhaps, meaning unkown projection.. allowing any transformation.



More information about the Users mailing list