[fusion-trac] #434: Projection handling problems (defs folder and
not passing wkt for parsing)
Fusion
trac_fusion at osgeo.org
Mon Feb 21 23:03:05 EST 2011
#434: Projection handling problems (defs folder and not passing wkt for parsing)
------------------------+---------------------------------------------------
Reporter: zspitzer | Owner: madair
Type: defect | Status: new
Priority: P2 | Milestone: 2.2
Component: MapGuide | Version: 2.2 - RC1
Severity: Major | Keywords:
External_id: | State: New
Browser: All | Os: All
------------------------+---------------------------------------------------
1. With 2.2 RC2, the standard template uses the fusion/lib/def directory
while the other templates use the template/def directory.
The problem relates to the single file version using lib/defs, while the
uncombined version uses template/defs
2. MapGuide provides a WKT projection, but it's not being passed to
Proj4js for parsing.
i.e. the map I'm currently working with has this projection in the map
definition
<CoordinateSystem>PROJCS["MGA-55",GEOGCS["LL-
GDA94",DATUM["GDA94",SPHEROID["GRS1980",6378137.000,298.25722210]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",500000.000],PARAMETER["false_northing",10000000.000],PARAMETER["scale_factor",0.999600000000],PARAMETER["central_meridian",147.00000000000000],PARAMETER["latitude_of_origin",0.00000000000000],UNIT["Meter",1.00000000000000]]</CoordinateSystem>
looking at the proj4js-combined.js file around line 486, I see the
following code
//check to see if this is a WKT string
if ((srsCode.indexOf('GEOGCS') >= 0) ||
(srsCode.indexOf('GEOCCS') >= 0) ||
(srsCode.indexOf('PROJCS') >= 0) ||
(srsCode.indexOf('LOCAL_CS') >= 0)) {
this.parseWKT(srsCode);
this.datum = new Proj4js.datum(this);
this.loadProjCode(this.projName);
return;
}
The SRS being passed is only the EPSG:28355 string, as opposed
to the definition from the map
hacking around, If I change the line in LoadMap.php line 114
$mapObj->wkt = $srs;
$mapObj->epsg = $epsgCode;
to
$mapObj->wkt = $srs;
$mapObj->epsg = $srs;
Result: no external projection requests as proj4js parsing
of PROJCS is triggered.
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/434>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list