[Mapserver-users] Graphical output errors with mercator projection

Sebastian Albrecht api at justapi.de
Tue Nov 18 11:08:39 EST 2003


Hello, me again ;)

I have programmed a mapserver-demo-like web interface using
PHP/mapscript so far. It should be possible to change to a few other
projections.
The problem is the mercator projection that does not work at all.

Here you can see three images containing the output of mercator and a
nasty graphical error:
http://justapi.de/mapserv/

Why does mapserver show these strange errors and how can I make them
disappear?

Regards,
Sebastian Albrecht


As you can see in the following map file (shortened) I have two
layers, a world coast line (projected in latlong/kartesian) and a
grid:


# Start of map file

NAME Mapserver
STATUS ON
EXTENT -180 -150 180 150
SIZE 600 500
UNITS DD
SHAPEPATH "./data"
IMAGECOLOR 65 125 200

DEBUG TRUE

IMAGETYPE png

PROJECTION
        "proj=merc"
        "ellps=WGS84"
END

#-----------------------------------------------------------

LAYER
  NAME "coastlines"
  TYPE POLYGON
  STATUS DEFAULT
  DATA cntry00
  
  PROJECTION
    "proj=latlong"   
    "ellps=WGS84" 
  END

  CLASSITEM "CNTRY_NAME"
  CLASS
    NAME "Länder"
    EXPRESSION /[ADGJMPSVY]./
    OUTLINECOLOR 80 80 40
    COLOR 230 230 150   
  END  
  CLASS      
    EXPRESSION /[BEHKNQTWZ]./
    OUTLINECOLOR 80 80 40
    COLOR 220 220 140
  END
  CLASS    
    EXPRESSION /./
    OUTLINECOLOR 80 80 40
    COLOR 200 200 120
  END
END


LAYER
  NAME "grid"
  TYPE LINE
  STATUS default

  PROJECTION
    "proj=latlong"
    "ellps=WGS84" 
  END
  
  GRID    
    MINARCS 2
    MAXARCS 10
    LABELFORMAT "%5.5f"    
  END
  
  CLASS
    SYMBOL "dashed_line"
    COLOR 170 170 200
    LABEL
      TYPE BITMAP
      SIZE SMALL
      COLOR 200 200 230
     SHADOWCOLOR 100 100 130
    END
  END
END



END # Map File




More information about the mapserver-users mailing list