[mapserver-users] MapServer 4.8.3: MapScript setProjection
Simon Greig
simon_greig at uk.ibm.com
Thu Mar 27 11:13:35 PDT 2008
Hi,
This is a follow up to a question a colleague asked a few weeks ago:
http://lists.osgeo.org/pipermail/mapserver-users/2008-March/054772.html
To summarise:
In order to improve performance in our java application that uses the
mapscript API we have replaced:
mapobj.setProjection("init=epsg:27700");
with
private static final String PROJECTION_WK_EPSG_27700 = "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\"]]";
...
mapobj.setWKTProjection(PROJECTION_WK_EPSG_27700);
We have also changed the code to use the WKT projection method for each
layer.
As Rob says the performance improvement is way better and we thought we
had a winner.
Unfortunately we have a problem based on the size of the image and
bounding box.
If we ask for a small bounding box (roughly 1 mile by 1 mile) with a
1000x800 PNG image then it works
If we ask for a large bounding box (roughly 500 miles by 500 miles) with a
200x200 PNG image then it works
If we ask for a large bounding box with a 300x300 PNG image then we get
this error:
"Layer must have an EPSG or AUTO projection code (in its PROJECTION object
or wms_srs metadata)"
Unfortunately Rob is on leave and I am looking after things in his
absence. Any help is much appreciated :-)
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080327/5377d35c/attachment.htm>
More information about the MapServer-users
mailing list