[mapserver-users] Projection Extent and Zoom issues - Openlayers

Jeff McKenna jmckenna at gatewaygeomatics.com
Wed Aug 12 08:32:03 EDT 2009


Paul Curran wrote:
> Hi,
> 
>  
> 
> I have had this problem for a couple of weeks now and I still cant get 
> past it. Basically when I view my map of the UK via openlayers it is 
> zoomed in very close. I want to zoom out but whatever I try doesn’t work 
> – usually results in just the background colour of my map being displayed.
> 
>  
> 
> I believe it might be my EXTENT which is incorrect as I am using 
> epsg:4326 (a spherical coordinate system). My map file is a Mapserver 
> Export from Quantim GIS and gave me the EXTENT -888385.321101 
> -31000.000000 1548385.321101 1271000.000000. How can I convert this into 
> a Geographic extent to match with my projection (epsg:4326)?
> 

Hi Paul,

Here are my quick thoughts:

- your EXTENT parameter in your mapfile is not in DD coordinates, even 
though you are telling MapServer that it is DD coordinates
- give a good read to the MapServer projections page: 
http://www.mapserver.org/mapfile/projection.html
- optionally, if you want to pre-process your data into your output 
projection, take a look at the gdal_translate 
(http://www.gdal.org/gdal_translate.html) and ogr2ogr 
(http://www.gdal.org/ogr2ogr.html) utilities for raster and vector data 
(both are included in MS4W)

-jeff

-- 
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/





More information about the mapserver-users mailing list