Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

all, I want to use openlayers with mapserver to create map of stars. but I dont know how to setting up the WMS config in mapserver , especially the EPSG re-projection things. In fact, I didnt any re-projection, and I just want to mapserver provide WMS and communicate with openlayers.

anyone can give some advice?

many thanks zzz

share|improve this question

In case you want your mapserver to provide WMS layer, which is reprojected on the fly you will require GDAL to be configured with your MapServer. If you are on windows a simple solution is installing MS4W. Now your mapfile definition could be as simple as follows:

        NAME USA
        STATUS ON
        SIZE 800 500
        IMAGECOLOR 240 240 240
        SHAPEPATH "/var/www/html/data"
        UNITS dd
      # The projection object is typically used within the map and the layer
      # objects. You only define it once within the map object and this definition
      # becomes your output projection--MapServer will render your maps in this
      # projection.  You also use the projection object within the layer object to 
      # define your input projection.  Your layers can be in different 
      # projections--MapServer will reproject them into your output projection.
            IMAGEPATH "/var/www/html/tmp/"
            IMAGEURL "/tmp/"

            NAME "US state boundaries"
            TYPE POLYGON
            STATUS ON
            DATA "statesp020"
                # projection for the Continental U.S.
                NAME "US states"
                OUTLINECOLOR 60 60 60
                COLOR 255 255 0
                SYMBOL 0

Here your input projection is Lambert Azimuthal Equal-Area (for US state boundaries layer) and your output is geographic (latlong) projection using the WGS84 datum

share|improve this answer
Works! Thanks a lot! In fact, I just put PROJECTION "init=epsg:4326" END – zzz May 2 '12 at 5:40
@zzz If it solves your requirement you can accept the answer. – thelastray May 2 '12 at 6:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.