[Mapserver-users] GRID problem using Mercator projection

Sebastian Albrecht api at justapi.de
Mon Nov 24 10:39:58 EST 2003


Hello,

I would like to use the GRID feature projected to Mercator. The
problem is the grid goes far above the -90 and 90 degree latitudes.
The result is PROJ4 returns undefined values because every latitude
value greater or equal 90 or -90 is infinite.

Mapserver gets the values (I suppose 0) back and draws diagonal lines
across the whole world map meeting in lat=0 and lon=0.

Can I somehow limit the latitude of the GRID feature or is there
anything else I can do - except not using the GRID feature?

Regards,
Sebastian


Parts of my map file:

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

IMAGETYPE png

PROJECTION
        "proj=latlong"
        "ellps=WGS84"
END

SYMBOL
  NAME "dashed_line"
  TYPE ellipse
  POINTS 2 2 END
  FILLED TRUE
  STYLE 2 5 END
END

LAYER
  NAME "grid"
  TYPE LINE
  STATUS default

  PROJECTION
    "proj=latlong"
    "ellps=WGS84"
    "datum=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