[mapserver-users] MapServer 4.8.3: MapScript setProjection

Rob gis at vanbooth.com
Fri Mar 14 10:29:28 EDT 2008


Just to follow this up, I have again tried

mapobj.setProjection('+proj=tmerc +lat_0=49 +lon_0=-2
+k=0.9996012717+x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36
+units=m +no_defs');

but this still does not work.

mapobj.setWKTProjection('PROJCS["OSGB 1936 / British National
Grid",GEOGCS["OSGB 1936",DATUM["OSGB_1936",SPHEROID["Airy 1830",6377563.396,
299.3249646
,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6277"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",
0.01745329251994328
,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4277"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",
0.9996012717
],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],AUTHORITY["EPSG","27700"]]')

does work however, and is completing in roughly 4ms (with a premium for the
first attempt ~ 50ms)

Compared to the 100-200ms I have been seeing for 'init=epsg:27700' this is a
significant improvement, especially as this method is used for every layer
in a request, and my standard request is approx 18 layers (2 seconds per
request has shrunk to 90ms).

Many thanks to all concerned for their help.  Much appreciated.

I would still like to know how to do it via a setProjection method, but I
now have an effective workaround.

Thanks

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080314/8ccb6368/attachment.html


More information about the mapserver-users mailing list