[fusion-trac] #434: Projection handling problems (defs folder and not passing wkt for parsing)
Fusion
trac_fusion at osgeo.org
Thu Aug 2 01:59:03 PDT 2012
#434: Projection handling problems (defs folder and not passing wkt for parsing)
----------------------+-----------------------------------------------------
Reporter: zspitzer | Owner: madair
Type: defect | Status: reopened
Priority: P2 | Milestone: 2.2
Component: MapGuide | Version: 2.2 - RC1
Severity: Major | Resolution:
Keywords: | External_id:
State: New | Browser: All
Os: All |
----------------------+-----------------------------------------------------
Comment(by jng):
From my experience, driving things through WKTs is unreliable (problem
with proj4js. I wish we could just tap into cs-map from javascript!
Problem would be solved!)
If we can do things via EPSG and supply the required proj4 string where
needed to Proj4js.defs (hence the idea of #535 to avoid external lookups),
things are usually better.
So in this case, mapagent ConvertWktToEpsgCode says epsg is 2056
[http://www.spatialreference.org/ref/epsg/2056/ spatialreference.org] says
the proj4 string for this is:
{{{
+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1
+x_0=2600000 +y_0=1200000 +ellps=bessel
+towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs
}}}
So I'm guessing you'd have to do this somewhere in the fusion
initialization process (or if #535 is implemented, as an CustomProjections
widget extension property):
{{{
Proj4js.defs["EPSG:2056"] = "+proj=somerc +lat_0=46.95240555555556
+lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel
+towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"
}}}
We could probably construct a csmap to proj4 lookup list to do this
seamlessly. LoadMap.php would just consult this lookup list to setup the
correct OpenLayers.Projection and construct the required Proj4js.defs
entry if required.
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/434#comment:9>
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