Problem with shape file rendering

Benoît Andrieu bea at IXSEA.COM
Thu Jan 31 07:15:06 PST 2008


Hi everyone !

I'm trying to render a shapefile with mapserver but I have some problems with the final result.

So my shapefile contains points.


--------------------------------------------------------------------------------

The projection used seems to be
PROJCS[
 "United Kingdom - ED50 / TM 0 NE - 1311 / 23090",
 GEOGCS[
  "ED50_UK_1311",
  DATUM[
   "D_ED50_UK_1311",
   SPHEROID[
    "International_1924",
    6378388,
    297.0000000000601]
  ],
  PRIMEM[
   "Greenwich",
   0],
  UNIT[
   "Degree",
   0.017453292519943295]
 ],
 PROJECTION["Transverse_Mercator"],
 PARAMETER["latitude_of_origin",0],
 PARAMETER["central_meridian",0],
 PARAMETER["scale_factor",0.9996],
 PARAMETER["false_easting",500000],
 PARAMETER["false_northing",0],
 UNIT["Meter",1]
]

This projection, translated in Proj4's format should be : +proj=tmerc +lat_0=0 +lon_0=0 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs.


--------------------------------------------------------------------------------

Now, my map file which only contains one layer is :
MAP
 Name"Shell"
 CONFIG "PROJ_LIB" "c:\Inetpub\wwwroot\Cgi\proj_lib\"
 EXTENT 277486 5873890 691772 6823080

 SIZE 512 512
 IMAGETYPE PNG24
 IMAGECOLOR 255 255 255
 UNITS METERS
 OUTPUTFORMAT NAME PNG24 DRIVER "GD/PNG" MIMETYPE "image/png" EXTENSION PNG  IMAGEMODE RGBA  TRANSPARENT ON  END

 PROJECTION    "+proj=tmerc +lat_0=0 +lon_0=0 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs"   END

 WEB
  IMAGEPATH  "c:\ms_tmp\"
  IMAGEURL  "http://ACQUISITIONTEST/ms_tmp"
  METADATA
   "wms_title" "Ob135_200"
   "wms_srs" "epsg:4326"
   "wms_onlineresource" "http://ACQUISITIONTEST/WMS/Default.aspx?MapId=8"
  END
 END

 SYMBOL
  NAME "quadrat"
  TYPE VECTOR
  POINTS
   0 0
   0 1
   1 1
   1 0
  END
  FILLED TRUE
 END

 LAYER
    NAME "Vector"
  TYPE POINT
  STATUS ON
  CONNECTIONTYPE OGR
  CONNECTION "C:/temp/bch/gbr_rigs.shp"
  PROJECTION "+proj=tmerc +lat_0=0 +lon_0=0 +k=0.999600 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs" END
  DATA "gbr_rigs"
  CLASS
   SYMBOL "quadrat"
   COLOR 255 0 0
   OUTLINECOLOR 0 0 0 
   SIZE 6
  END
 END
END

--------------------------------------------------------------------------------


Given all this, I first tried to render this with a web browser by writing directly my request :
http://acquisitiontest/CGI/bin/mapserv.exe?request=GetMap&map=C:/temp/bch/Shell.map&request=GetMap&layers=Vector&srs=EPSG:4326&version=1.1.1&styles=
By not giving the extent nor width and height, I am expecting to take the full bounding box of the map file as width and height. I am already doing this for raster layers so I won't be surprised to make it work for shape files.

But, unfortunately, the result  remains empty whatever I try.

So, I remembered to use the shp2img to make a render and there I have a correct result.


More information about the MapServer-users mailing list