[mapserver-users] Projection

Thomas Hofmann thomas at savoy-truffle.de
Thu Jun 14 07:39:28 PDT 2012


Hello,

currently I am working on a map displaying the distiribution of a name
(surname/forename/location name) in Germany. For that purpose
mapserver (v. 5.6.5) and php-mapscript is used.

The underlying geographic information is from a public domain
shapefile containing postcode (PLZ) regions of germany:
http://www.metaspatial.net/download/plz.tar.gz

Details on that data in german:
http://arnulf.us/PLZ

There the data is described as originally been in "Gauß Krüger
3-Streifen", but the shapefile's data as beeing converted to EPSG:4326
(WGS84).

The map should be rendered so that the width and height of germany are
more or less like here:
http://de.wikipedia.org/wiki/Datei:Deutschland_politisch_2010.png

Without configured projections it looks like:
https://www.dropbox.com/s/n1uobhd12xhsf4u/1ee63112dc71c15f1247994883aebc42.png

So some projection is needed.

One question is, what projection would be appropriate, I suppose
something like "Alber's equal area" or "Gauß-Krüger zone 3" could do
the trick. But before that I would be glad if an arbitrary projection
would work at all...

The map-file as generated via mapscript looks like (cut to the
relevant part, as far as I understand it):
MAP
  EXTENT 5.05686874304783 47.2 15.5931312569522 55.1
  IMAGECOLOR 255 255 255
  IMAGETYPE gif
  SIZE 1200 900
  STATUS ON
  CONFIG PROJ_LIB "/usr/share/proj/"
  NAME "Germany"

  PROJECTION
    "init=epsg:2166"
  END

  LAYER
    NAME "0"
    PROJECTION
      "init=epsg:4326"
    END
    STATUS DEFAULT
    TYPE POLYGON
    UNITS METERS
    CLASS
      NAME "PLZ"
      STYLE
        ANGLE 360
        COLOR 99 99 99
        OUTLINECOLOR 0 0 0
        SYMBOL 0
        WIDTH 1
      END
    END
  END

END

With this map-file the PLZ layer is not displayed. If omitting the
PROJECTION-section within the LAYER it is displayed.
For reference: the whole zipped mapfile, containing the data:
https://www.dropbox.com/s/sd65gc7dch7swh3/projection.complete.map.zip

So:
- What to do, to get projections working?
- What kind of projection would be appropriate?

Hints are most welcome.

Kind regards,
Thomas Hofmann



More information about the MapServer-users mailing list