Problems with mapserver and oblique projections

Trond Michelsen trondmm-mapserver at CRUSADERS.NO
Wed Nov 15 10:24:59 EST 2006


Hi.

I'm having some problems getting mapserver 4.4.1 to draw maps in an
oblique projection.

Here's an example:

http://wms.met.no/cgi-bin/mapserv?map=../vhosts/mercator/conf/google.map&LAYERS=kart,cdc,base.LATLON&TRANSPARENT=false&BGCOLOR=0x99B3CC&EXCEPTIONS=application/vnd.ogc.se_inimage&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=-180,-90,180,90&WIDTH=800&HEIGHT=400&SRS=EPSG:44065
( http://tinyurl.com/ykem3c )

(red coastlines are drawn by mapserver, the grey land, the bluish
coastlines and the gridlines are drawn by an internal WMS-server.)

As you can see, mapserver omits most of the shapes close to the North
Pole, and there are some wrapping issues at the south pole. 

the proj-definition looks like this:

+proj=ob_tran +o_proj=eqc +lon_0=0 +o_lat_p=25 +a=57.29577953604224884 +b=57.29577953604224884 +no_defs <>

(the bizarre minor and major axis sizes are used to get
pseudo-decimaldegrees as units. I should probably use some scaling
parameter instead, but I was unable to find something that corresponds
to the -m command line parameter)

and my map is configured like this in the mapfile:

LAYER
  name "cdc"
  data "cntry00"
  status on
  type polygon
  PROJECTION
    "+proj=latlong"
    "+a=6371000"
    "+b=6371000"
  END
  CLASS
    STYLE
      outlinecolor 255 0 0
    END
  END
END


If the tilting is more severe, even more countries are left out of the
plot:

http://wms.met.no/cgi-bin/mapserv?map=../vhosts/mercator/conf/google.map&LAYERS=kart,cdc,base.LATLON&TRANSPARENT=false&BGCOLOR=0x99B3CC&EXCEPTIONS=application/vnd.ogc.se_inimage&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=-180,-90,180,90&WIDTH=800&HEIGHT=400&SRS=EPSG:44090

With no tilt at all, you basically get regular latlong coordinates,
and now all countries are being displayed:

http://wms.met.no/cgi-bin/mapserv?map=../vhosts/mercator/conf/google.map&LAYERS=kart,cdc,base.LATLON&TRANSPARENT=false&BGCOLOR=0x99B3CC&EXCEPTIONS=application/vnd.ogc.se_inimage&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=-180,-90,180,90&WIDTH=800&HEIGHT=400&SRS=EPSG:44000

Does anyone know what I'm doing wrong? Is there something I can do to
get mapserver to plot all countries in this projection? (Preferrably
without the wrapping issues).

-- 
Trond Michelsen



More information about the mapserver-users mailing list