Re: [OpenLayers-Users] Coordinates systems transformations?

2008-02-14 Thread David E. Reksten
Take a look at:
http://spatialreference.org/ref/epsg/23030/
http://spatialreference.org/ref/epsg/23030/proj4js/

.david

On 13/02/2008, Ruben Pardo [EMAIL PROTECTED] wrote:
 hi,
 does proj4js support EPSG:23030 to WGS84 transformation or viceversa?
 i didn't see in the proj4js docs, is it going to support  it?
 Thanks very much.

 best regards


 2008/2/13, David E. Reksten [EMAIL PROTECTED]:
  This is how I reproject LL to UTM32:
 
  var destProj = new Proj4js.Proj(map.getProjection()); // Euref89 UTM32
  var sourceProj = new Proj4js.Proj(EPSG:4326); // WGS84 LonLat
  var position = new OpenLayers.Geometry.Point(lon, lat);
  Proj4js.transform(sourceProj, destProj, position);
 
  Thereafter, position.x and position.y will contain the reprojected
 coordinates.
 
  Using trunk versions of OL and Proj4js. Hope this helps.
 
  .david
 
  On 13/02/2008, Andrea Maschio [EMAIL PROTECTED] wrote:
   Hi all, I suppose that the method Bounds.transform(ProjA, ProjB)
   should transform the coordinates between differents EPSG codes.
  
   Now I was trying this:
  
   var p = bounds
console.log(p)
p = bounds.transform(new OpenLayers.Projection(EPSG:
   900913), new OpenLayers.Projection(EPSG:3003))
console.log(p)
  
   But p has always the same coords. Btw I am working in a projected
   layer (projected from 3003 to 900913) and my wfs layers are ok, but
   being my coords in the Gauss Boaga metric system, I cannot get them
   correctly trying for example a GetFeatureInfo call using a BBOX.
  
   Shall I perform a linear translation of the coordinates?
  
   Thanks
  
  
  
   Andrea Maschio
   http://www.superandrew.it
  
   ___
   Users mailing list
   Users@openlayers.org
   http://openlayers.org/mailman/listinfo/users
  
  ___
  Users mailing list
  Users@openlayers.org
  http://openlayers.org/mailman/listinfo/users
 


___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Coordinates systems transformations?

2008-02-14 Thread Mike Adair
EPSG:23030 is a UTM projection, so yes it is supported.

Mike

David E. Reksten wrote:
 Take a look at:
 http://spatialreference.org/ref/epsg/23030/
 http://spatialreference.org/ref/epsg/23030/proj4js/

 .david

 On 13/02/2008, Ruben Pardo [EMAIL PROTECTED] wrote:
   
 hi,
 does proj4js support EPSG:23030 to WGS84 transformation or viceversa?
 i didn't see in the proj4js docs, is it going to support  it?
 Thanks very much.

 best regards


 2008/2/13, David E. Reksten [EMAIL PROTECTED]:
 
 This is how I reproject LL to UTM32:

 var destProj = new Proj4js.Proj(map.getProjection()); // Euref89 UTM32
 var sourceProj = new Proj4js.Proj(EPSG:4326); // WGS84 LonLat
 var position = new OpenLayers.Geometry.Point(lon, lat);
 Proj4js.transform(sourceProj, destProj, position);

 Thereafter, position.x and position.y will contain the reprojected
   
 coordinates.
 
 Using trunk versions of OL and Proj4js. Hope this helps.

 .david

 On 13/02/2008, Andrea Maschio [EMAIL PROTECTED] wrote:
   
 Hi all, I suppose that the method Bounds.transform(ProjA, ProjB)
 should transform the coordinates between differents EPSG codes.

 Now I was trying this:

 var p = bounds
  console.log(p)
  p = bounds.transform(new OpenLayers.Projection(EPSG:
 900913), new OpenLayers.Projection(EPSG:3003))
  console.log(p)

 But p has always the same coords. Btw I am working in a projected
 layer (projected from 3003 to 900913) and my wfs layers are ok, but
 being my coords in the Gauss Boaga metric system, I cannot get them
 correctly trying for example a GetFeatureInfo call using a BBOX.

 Shall I perform a linear translation of the coordinates?

 Thanks



 Andrea Maschio
 http://www.superandrew.it

 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users

 
 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users

   
 
 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users

   
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Coordinates systems transformations?

2008-02-13 Thread David E. Reksten
This is how I reproject LL to UTM32:

var destProj = new Proj4js.Proj(map.getProjection()); // Euref89 UTM32
var sourceProj = new Proj4js.Proj(EPSG:4326); // WGS84 LonLat
var position = new OpenLayers.Geometry.Point(lon, lat);
Proj4js.transform(sourceProj, destProj, position);

Thereafter, position.x and position.y will contain the reprojected coordinates.

Using trunk versions of OL and Proj4js. Hope this helps.

.david

On 13/02/2008, Andrea Maschio [EMAIL PROTECTED] wrote:
 Hi all, I suppose that the method Bounds.transform(ProjA, ProjB)
 should transform the coordinates between differents EPSG codes.

 Now I was trying this:

 var p = bounds
  console.log(p)
  p = bounds.transform(new OpenLayers.Projection(EPSG:
 900913), new OpenLayers.Projection(EPSG:3003))
  console.log(p)

 But p has always the same coords. Btw I am working in a projected
 layer (projected from 3003 to 900913) and my wfs layers are ok, but
 being my coords in the Gauss Boaga metric system, I cannot get them
 correctly trying for example a GetFeatureInfo call using a BBOX.

 Shall I perform a linear translation of the coordinates?

 Thanks



 Andrea Maschio
 http://www.superandrew.it

 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Coordinates systems transformations?

2008-02-13 Thread Ruben Pardo
hi,
does proj4js support EPSG:23030 to WGS84 transformation or viceversa?
i didn't see in the proj4js docs, is it going to support  it?
Thanks very much.

best regards


2008/2/13, David E. Reksten [EMAIL PROTECTED]:

 This is how I reproject LL to UTM32:

 var destProj = new Proj4js.Proj(map.getProjection()); // Euref89 UTM32
 var sourceProj = new Proj4js.Proj(EPSG:4326); // WGS84 LonLat
 var position = new OpenLayers.Geometry.Point(lon, lat);
 Proj4js.transform(sourceProj, destProj, position);

 Thereafter, position.x and position.y will contain the reprojected
 coordinates.

 Using trunk versions of OL and Proj4js. Hope this helps.

 .david

 On 13/02/2008, Andrea Maschio [EMAIL PROTECTED] wrote:
  Hi all, I suppose that the method Bounds.transform(ProjA, ProjB)
  should transform the coordinates between differents EPSG codes.
 
  Now I was trying this:
 
  var p = bounds
   console.log(p)
   p = bounds.transform(new OpenLayers.Projection(EPSG:
  900913), new OpenLayers.Projection(EPSG:3003))
   console.log(p)
 
  But p has always the same coords. Btw I am working in a projected
  layer (projected from 3003 to 900913) and my wfs layers are ok, but
  being my coords in the Gauss Boaga metric system, I cannot get them
  correctly trying for example a GetFeatureInfo call using a BBOX.
 
  Shall I perform a linear translation of the coordinates?
 
  Thanks
 
 
 
  Andrea Maschio
  http://www.superandrew.it
 
  ___
  Users mailing list
  Users@openlayers.org
  http://openlayers.org/mailman/listinfo/users
 
 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


[OpenLayers-Users] Coordinates systems transformations?

2008-02-12 Thread Andrea Maschio
Hi all, I suppose that the method Bounds.transform(ProjA, ProjB)  
should transform the coordinates between differents EPSG codes.

Now I was trying this:

var p = bounds
 console.log(p)
 p = bounds.transform(new OpenLayers.Projection(EPSG: 
900913), new OpenLayers.Projection(EPSG:3003))
 console.log(p)

But p has always the same coords. Btw I am working in a projected  
layer (projected from 3003 to 900913) and my wfs layers are ok, but  
being my coords in the Gauss Boaga metric system, I cannot get them  
correctly trying for example a GetFeatureInfo call using a BBOX.

Shall I perform a linear translation of the coordinates?

Thanks



Andrea Maschio
http://www.superandrew.it

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Coordinates systems transformations?

2008-02-12 Thread Eric Lemoine
Hi,

You need the proj4.js library to do reprojection in OpenLayers.

https://svn.codehaus.org/mapbuilder/cscs/trunk/proj4js/lib

Even with that I'm not sure EPSG:3003 will be supported. I recall that
the author of proj4.js (Mike Adair) gave a list of supported
projections on the OpenLayers mailing list but I can't find his email.
Searching the mailing on nabble you should be able to find this list
http://www.nabble.com/OpenLayers-f15906.html.

Hope this helps;
--
Eric




On Feb 13, 2008 1:31 AM, Andrea Maschio [EMAIL PROTECTED] wrote:
 Hi all, I suppose that the method Bounds.transform(ProjA, ProjB)
 should transform the coordinates between differents EPSG codes.

 Now I was trying this:

 var p = bounds
  console.log(p)
  p = bounds.transform(new OpenLayers.Projection(EPSG:
 900913), new OpenLayers.Projection(EPSG:3003))
  console.log(p)

 But p has always the same coords. Btw I am working in a projected
 layer (projected from 3003 to 900913) and my wfs layers are ok, but
 being my coords in the Gauss Boaga metric system, I cannot get them
 correctly trying for example a GetFeatureInfo call using a BBOX.

 Shall I perform a linear translation of the coordinates?

 Thanks



 Andrea Maschio
 http://www.superandrew.it

 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Coordinates systems transformations?

2008-02-12 Thread Andrea Maschio
Ok, you're right 3003 isn't supported. But giving the Proj4 definition  
i have in my proj4 (java) epsg file, which is

3003 +proj=tmerc +lat_0=0 +lon_0=9 +k=0.999600 +x_0=150 +y_0=0  
+ellps=intl +units=m +no_defs  

i could simply add my definition like this

Proj4js.defs[EPSG:3003] = +title=Gauss Boaga EPSG:3003 \
   +proj=tmerc
   +lat_0=0
   +lon_0=9
   +k=0.999600
   +x_0=150
   +y_0=0
   +ellps=intl
   +units=m
   +no_defs;

? And as I see, OpenLayers actually doesn't use proj4.js for  
reprojecting, am I right? How can I perform the client side  
reprojection?

Geoserver does it correctly but when my map is in utm coordinates  
(these are the googlish one, right?) if I try to get a feature via  
BBOX the BBOX it is not in the original feature's projection  
coordinates.

Thanks a lot
Andrea Maschio

Il giorno 13/feb/08, alle ore 06:56, Eric Lemoine ha scritto:

 Hi,

 You need the proj4.js library to do reprojection in OpenLayers.

 https://svn.codehaus.org/mapbuilder/cscs/trunk/proj4js/lib

 Even with that I'm not sure EPSG:3003 will be supported. I recall that
 the author of proj4.js (Mike Adair) gave a list of supported
 projections on the OpenLayers mailing list but I can't find his email.
 Searching the mailing on nabble you should be able to find this list
 http://www.nabble.com/OpenLayers-f15906.html.

 Hope this helps;
 --
 Eric




 On Feb 13, 2008 1:31 AM, Andrea Maschio [EMAIL PROTECTED]  
 wrote:
 Hi all, I suppose that the method Bounds.transform(ProjA, ProjB)
 should transform the coordinates between differents EPSG codes.

 Now I was trying this:

var p = bounds
 console.log(p)
 p = bounds.transform(new OpenLayers.Projection(EPSG:
 900913), new OpenLayers.Projection(EPSG:3003))
 console.log(p)

 But p has always the same coords. Btw I am working in a projected
 layer (projected from 3003 to 900913) and my wfs layers are ok, but
 being my coords in the Gauss Boaga metric system, I cannot get them
 correctly trying for example a GetFeatureInfo call using a BBOX.

 Shall I perform a linear translation of the coordinates?

 Thanks



 Andrea Maschio
 http://www.superandrew.it

 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users


___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users