[OSM-talk] Freemap update

Christopher Schmidt crschmidt at crschmidt.net
Tue Jul 4 00:01:03 BST 2006


On Mon, Jul 03, 2006 at 11:54:44PM +0100, nick at hogweed.org wrote:
> 
> >
> > Displaying mercator projected maps:
> > This is what OpenLayers can do, and I'll have a demo of the OSM data
> > with this within the next week or so.
> >
> > The former is the way that OSM currently works. The latter is the way
> > that everything else in the world works.
> 
> Out of interest how does this work? Would you have to store all the data in 
> Mercator-projected coordinates?

You tell mapserver "I want you to make me my data in Mercator, please!"
and it does it. :) As a speed optimization, you can pre-perform this
conversion (using ogr2ogr on a shapefile will do it) so that Mapserver
is rendering in the same projection as your data. The Boston Freemap
data for a long time was rendered in WGS-84, even though the underling
data is in the Mass State Plane (EPSG:2805), becuase that's all
OpenLayers supported. The conversion was seamless via Mapserver --
changing to a state plane only required changing 3 variables
(projection, maxExtent and maxResolution) in OpenLayers, and adding 10
characters to the mapserver mapfile.

The problem is that there's no 'worldwide' mercator projection, built
into Mapserver so I'm going to have to create one (or find one) that 
will work, and since it doesn't exist yet, there is no support in other 
image servers -- like NASA -- for it. The reason for this is that 
typically, EPSG codes and projection setups are reserved for GIS 
*analysis*, where a Worldwide Mercator projection doesn't make sense.

I've already talked about that with my local Mapserver gurus, I just
need to get a block of free time to get it done.

-- 
Christopher Schmidt
Web Developer




More information about the talk mailing list