[OpenLayers-Trac] [OpenLayers] #2988: Format.OSM.write doesn't reproject

OpenLayers trac-20090302 at openlayers.org
Wed Dec 22 01:50:30 EST 2010


#2988: Format.OSM.write doesn't reproject
---------------------+------------------------------------------------------
 Reporter:  erilem   |       Owner:  tschaub     
     Type:  feature  |      Status:  new         
 Priority:  minor    |   Milestone:  2.11 Release
Component:  Format   |     Version:  SVN         
 Keywords:           |       State:              
---------------------+------------------------------------------------------
 The summary says it all.

 Here's what Arnd Wipperman wrote on the mailing list about this:

 {{{
 On Tuesday, December 21, 2010, Arnd Wippermann <arnd.wippermann at web.de>
 wrote:
 > Hi,
 >
 > for writing OSM data there is no call to geometry.transform
 >
 > you can patch the file OSM.js
 >
 >     createXML: {
 >         'point': function(point) {
 >             var id = null;
 >             var geometry = point.geometry ? point.geometry : point;
 >
 > //at line 349 add this 5 lines
 >             if (this.externalProjection && this.internalProjection) {
 >                 geometry = geometry.clone();
 >                 geometry.transform(this.internalProjection,
 >                                    this.externalProjection);
 >             }
 > //
 >             var already_exists = false; // We don't return anything if
 the
 > node
 >
 > and the transformation for writing works.
 >
 > What i don't understand, that an externalProjection given in the options
 is
 > used instead of
 >
 > // OSM coordinates are always in longlat WGS84
 > this.externalProjection = new OpenLayers.Projection("EPSG:4326");
 >
 > as set in the initialize function, what should overwrite the options
 value.
 >
 > With the patch one can create OSM data in different projection than
 > EPSG:4326.
 >
 > Arnd
 >
 }}}

-- 
Ticket URL: <http://trac.openlayers.org/ticket/2988>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list