newbie needs help correcting distorted map

Ed McNierney ed at TOPOZONE.COM
Tue Oct 12 09:35:52 PDT 2004


Mike -

It sounds like nothing's wrong at all, except your choice of output projection.  The "geographic" projection has MANY limitations, including the fact that it badly distorts areas far from the Equator.  But all projections have strong points and weak points - that's why there are several to choose from.

You should try to do some research on what a good output projection would be.  If you're particularly interested in northern Europe, then look for the projections that are popular in those countries.  You can then change the MAP-level PROJECTION, UNITS, and EXTENT to reflect the *output* projection you want, while leaving the LAYER definitions alone, since those do accurately describe the *input* projection of your source data.

     - Ed

Ed McNierney
TopoZone.com

----- Original Message -----
From: Mike Jackson <mj at SCI.FI>
To: MAPSERVER-USERS at LISTS.UMN.EDU
Sent: Tue, 12 Oct 2004 13:23:09 -0400
Subject: [UMN_MAPSERVER-USERS] newbie needs help correcting distorted map


> Hi All,
>  I've just completed the tutorial, and tried to hack together my first
> maps, but they seem to be distorted, especially the northern countries.
> I tried the epsg 4326, and many others, just to experiment, but none of
> them really had much effect on the output. I'm using the countries.shp
> from freegis world data.
> 
>  Here is my .map file:
> 
> MAP
>   IMAGETYPE      PNG
>   EXTENT         -179.999900 -89.999900 179.999900 83.627357
>   SIZE           1390 900    # fits my browser nicely
>   SHAPEPATH      "geodata"
>   IMAGECOLOR     0   0   128 # navy blue
>   PROJECTION
>     "init=epsg:4326"
>   END
> 
>   LAYER
>     NAME         countries_interior
>     DATA         countries
>     STATUS       DEFAULT
>     TYPE         POLYGON
>     CLASS
>       COLOR        82 82 82 # gray32
>     END
>   PROJECTION
>     "init=epsg:4326"
>   END
>   END
> 
>   LAYER
>     NAME         countries
>     DATA         countries
>     STATUS       DEFAULT
>     TYPE         LINE
>     CLASS
>       COLOR 255 255 0 # yellow
>     END
>   PROJECTION
>     "init=epsg:4326"
>   END
>   END
> END
> 
> 
> 
> Here is the head output from ogrinfo -al:
> 
> INFO: Open of `countries.shp'
> using driver `ESRI Shapefile' successful.
> 
> Layer name: countries
> Geometry: Polygon
> Feature Count: 27320
> Extent: (-179.999900, -89.999900) - (179.999900, 83.627357)
> Layer SRS WKT:
> GEOGCS["wgs84",
>     DATUM["unknown",
>         SPHEROID["wgs84",6378137,298.257223563]],
>     PRIMEM["Greenwich",0],
>     UNIT["degree",0.0174532925199433]]
> cat: Integer (11.0)
> na2: String (80.0)
> 
> 
>  Any ideas what I am doing wrong, and better yet how to correct it?
> 
> Thanks!
> Mike
> 



More information about the MapServer-users mailing list