[OpenLayers-Users] conversion of bounding boxes to various
projections
stephane.poirier at usherbrooke.ca
stephane.poirier at usherbrooke.ca
Mon May 18 16:54:30 EDT 2009
Hi All,
Is it easy to use openlayers to convert bounding boxes from one EPSG to another.
With WGS84 world geodesic datum projection EPSG:4326, North America has a bounding box of
defaultBounds=new OpenLayers.Bounds(-180, 5, -10, 85); //north america, working with google, nasa, metacarta, etc.
var myproj=new OpenLayers.Projection(myepsg);
With Lambert Conic Conformal projection EPSG:42304, Canada has a bounding box of
defaultBounds=new OpenLayers.Bounds(-2750564.75,-936638.5,3583872.5,4673125); //canada
var myepsg="EPSG:42304"; //Lambert Conic Conformal, working with http://atlas.gc.ca/cgi-bin/atlaswms_en
var myproj=new OpenLayers.Projection(myepsg);
Q: How can I have the bounding box for North America in EPSG:42304?
Stephane
Stephane Poirier - Research professional
Center of Applications in Remote Sensing
Applied Geomatics Department
University of Sherbrooke
Sherbrooke (Quebec), CANADA J1K 2R1
Tel.: (+1 819) 821 8000 #61904
Fax.: (+1 819) 821 7944
Stephane.Poirier at USherbrooke.ca
http://www.usherbrooke.ca/cartel
P.S.:
//works fine
defaultBounds=new OpenLayers.Bounds(-180, 5, -10, 85); //north america
var myepsg="EPSG:4326"; //working with google, nasa, metacarta, etc.)
//works fine
//BBOX=-2750564.75,-936638.5,3583872.5,4673125 //for canada
defaultBounds=new OpenLayers.Bounds(-2750564.75,-936638.5,3583872.5,4673125); //north america
var myepsg="EPSG:42304"; //Lambert Conic Conformal, working with http://atlas.gc.ca/cgi-bin/atlaswms_en
var myproj=new OpenLayers.Projection(myepsg);
//How to specify northern hemisphere
//defaultBounds=new OpenLayers.Bounds(-180, 0, +180, 90); //north hemisphere?
defaultBounds=new OpenLayers.Bounds(?, ?,?,?); //north hemisphere
var myepsg="EPSG:102018"; //North Pole Stereographic, working with http://atlas.gc.ca/cgi-bin/atlaswms_en
var myproj=new OpenLayers.Projection(myepsg);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090518/79f225af/attachment.html
More information about the Users
mailing list