Mustafa646 | 2 Aug 2011 10:41
Picon

Changing projection in OL code

I have a shapefile with native projection SWREFF99_1800. For publishing on
Geoserver, I changed it from SWREFF99_1800 to Spherical Mercator (EPSG:4326)
by using third party tool ogr2ogr. And finally i published it on Geoserver
and Displayed it over Google base map in my OL Web Page. 

I want to change this projection (from SWREFF99_1800 to EPSG:4326) by using
some code in my OL web page instead of changing it by using third party tool
before publishing it on Geoserver. Is it possible and if yes, then what will
be the possible code/method for this ?

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Changing-projection-in-OL-code-tp6644040p6644040.html
Sent from the PROJ.4 mailing list archive at Nabble.com.
_______________________________________________
Proj mailing list
Proj <at> lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj

support.mn | 2 Aug 2011 11:44
Picon

Re: Changing projection in OL code

Hello,

what "OL code" you are talking about?

Regards: Janne.

-------------------------------------------------------

Mustafa646 [noorcs22 <at> gmail.com] kirjoitti: 
> I have a shapefile with native projection SWREFF99_1800. For publishing on
> Geoserver, I changed it from SWREFF99_1800 to Spherical Mercator (EPSG:4326)
> by using third party tool ogr2ogr. And finally i published it on Geoserver
> and Displayed it over Google base map in my OL Web Page. 
> 
> I want to change this projection (from SWREFF99_1800 to EPSG:4326) by using
> some code in my OL web page instead of changing it by using third party tool
> before publishing it on Geoserver. Is it possible and if yes, then what will
> be the possible code/method for this ?
> 
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Changing-projection-in-OL-code-tp6644040p6644040.html
> Sent from the PROJ.4 mailing list archive at Nabble.com.
> _______________________________________________
> Proj mailing list
> Proj <at> lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
> 

_______________________________________________
Proj mailing list
(Continue reading)

Mustafa646 | 2 Aug 2011 14:24
Picon

Re: Changing projection in OL code

"OL code" means coding by using OpenLayers API Library.

Can i change projection of shapefile published on Geoserver by using
OpenLayers API ?

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Changing-projection-in-OL-code-tp6644040p6644683.html
Sent from the PROJ.4 mailing list archive at Nabble.com.
_______________________________________________
Proj mailing list
Proj <at> lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj

Jean-Claude Repetto | 2 Aug 2011 15:19
Picon
Favicon

Re: Changing projection in OL code

Le 02/08/2011 14:24, Mustafa646 a écrit :
> "OL code" means coding by using OpenLayers API Library.
>
> Can i change projection of shapefile published on Geoserver by using
> OpenLayers API ?
>

Hello,

I think you are posting on the wrong ML. Try the Geoserver or OpenLayers 
mailing lists.

Jean-Claude
_______________________________________________
Proj mailing list
Proj <at> lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj

Francesco Boccacci | 2 Aug 2011 17:44
Picon
Favicon

Invitation to connect on LinkedIn

LinkedIn

I'd like to add you to my professional network on LinkedIn.

- Francesco

Francesco Boccacci
R&D developer at Navionics s.p.a
Florence Area, Italy

Confirm that you know Francesco

© 2011, LinkedIn Corporation

_______________________________________________
Proj mailing list
Proj <at> lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj
zagot | 4 Aug 2011 09:23
Picon

Google Mercator Projection

Hi to All,
this is an oldie, but i cannot seem to find a solution.
When i want to do a transform on a wgs84 to google/bing the y coordinate
shifts.

I have read this  variuos post and this official note:
http://trac.osgeo.org/proj/wiki/FAQ#ChangingEllipsoidWhycantIconvertfromWGS84toGoogleEarthVirtualGlobeMercator

...so I tried adding +nadgrids= <at> null like i read, but with this example:

from ..."+proj=latlong +datum=WGS84";

to... "+proj=merc +a=6378137 +b=6378137 +lat_t1=0.0 +lon_0=0.0 +x_0=0.0
+y_0=0 +k=1.0 +units=m +nadgrids= <at> null +no_defs"

i have this result -626172.1357121646,  6887893.4928337997 

in the result y differ from correct value:6853955.508199729 (with Proj.NET
the result is correct)

..seems adding +nadgrids= <at> null  have no effect

what's I wrong?

thanks in advance

sorry for my english
thanks

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Google-Mercator-Projection-tp6651663p6651663.html
Sent from the PROJ.4 mailing list archive at Nabble.com.
_______________________________________________
Proj mailing list
Proj <at> lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj

Jean-Claude Repetto | 4 Aug 2011 10:02
Picon
Favicon

Re: Google Mercator Projection

Le 04/08/2011 09:23, zagot a écrit :

> i have this result -626172.1357121646,  6887893.4928337997
>
What are the input coordinates ?
_______________________________________________
Proj mailing list
Proj <at> lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj

zagot | 4 Aug 2011 10:56
Picon

Re: Google Mercator Projection

ops sorry

this is input values

//trasform to radians
 Double R=0.0174532925199432958;
 Double X = -5.625*R;
 Double Y = 52.4827802220782*R;

then we have
x=-0.098174770424681035 
y=0.9159973154758253

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Google-Mercator-Projection-tp6651663p6651893.html
Sent from the PROJ.4 mailing list archive at Nabble.com.
_______________________________________________
Proj mailing list
Proj <at> lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj

zagot | 4 Aug 2011 11:03
Picon

Re: Google Mercator Projection

I use Proj.dll version 4.4.6 

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Google-Mercator-Projection-tp6651663p6651909.html
Sent from the PROJ.4 mailing list archive at Nabble.com.
_______________________________________________
Proj mailing list
Proj <at> lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj

Jean-Claude Repetto | 4 Aug 2011 11:39
Picon
Favicon

Re: Google Mercator Projection

Le 04/08/2011 09:23, zagot a écrit :
> Hi to All,
> this is an oldie, but i cannot seem to find a solution.
> When i want to do a transform on a wgs84 to google/bing the y coordinate
> shifts.
>
> I have read this  variuos post and this official note:
> http://trac.osgeo.org/proj/wiki/FAQ#ChangingEllipsoidWhycantIconvertfromWGS84toGoogleEarthVirtualGlobeMercator
>
> ...so I tried adding +nadgrids= <at> null like i read, but with this example:
>
> from ..."+proj=latlong +datum=WGS84";
>
> to... "+proj=merc +a=6378137 +b=6378137 +lat_t1=0.0 +lon_0=0.0 +x_0=0.0
> +y_0=0 +k=1.0 +units=m +nadgrids= <at> null +no_defs"
>
> i have this result -626172.1357121646,  6887893.4928337997
>
> in the result y differ from correct value:6853955.508199729 (with Proj.NET
> the result is correct)
>
> ..seems adding +nadgrids= <at> null  have no effect
>
> what's I wrong?

You have forgotten to specify the datum for the projected CRS :

cs2cs +proj=latlong +datum=WGS84 +to +proj=merc +a=6378137 +b=6378137 
+lat_t1=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +datum=WGS84 +units=m 
+nadgrids= <at> null +no_defs
-5.625 52.4827802220782
-626172.14	6853979.30 0.00

Jean-Claude
_______________________________________________
Proj mailing list
Proj <at> lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj


Gmane