[OpenLayers-Dev] Reprojection from WGS84 to Spherical Mercator

Felipe Alcacibar falcacibar at gmail.com
Mon Jun 15 18:13:42 EDT 2009


Christopher:

this is the definition, aparantly the only diference is the srtext field:

orionforestal=# select * from spatial_ref_sys where srid = 900913;
-[ RECORD 1 ]------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
srid      | 900913
auth_name | EPSG
auth_srid | 900913
srtext    | GEOGCS["WGS 84", DATUM["World Geodetic System
         : 1984", SPHEROID["WGS 84", 6378137.0,
298.257223563,AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich", 0.0,
AUTHORITY["EPSG","8901"]], NIT["degree",0.017453292519943295],
AXIS["Longitude", EAST], AXIS["Latitude",
NORTH],AUTHORITY["EPSG","4326"]],
PROJECTION["Mercator_1SP"],PARAMETER["semi_minor", 6378137.0],
         : PARAMETER["latitude_of_origin",0.0],
PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor",1.0],
PARAMETER["false_easting", 0.0], PARAMETER["false_northing",
0.0],UNIT["m", 1.0], AXIS["x", EAST], AXIS["y",
NORTH],AUTHORITY["EPSG","900913"]] |
proj4text | +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+x_0=0.0 +y_0=0 +k=1.0 +units=m
         : +nadgrids=@null +no_defs

maybe you need another test, just tell me... i start to think bad about that...
thanks.

Felipe

On Mon, Jun 15, 2009 at 9:18 AM, Christopher
Schmidt<crschmidt at metacarta.com> wrote:
> On Mon, Jun 15, 2009 at 07:41:48AM -0400, Felipe Alcacibar wrote:
>> Hi, some days ago the list shows me about google layers and spherical mercator.
>>
>> everything is works fine, but i cannot do a good reprojection from
>> WGS84 to Spherical Mercator
>> i trying with postgis with the statement:
>>
>> ST_transform(ST_setSRID(geom, 4326), 900913)
> u=# insert into spatial_ref_sys VALUES (900913, 'EPSG', 900913, '', '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs');
> INSERT 0 1
> u=# select astext(transform(geomfromtext('POINT(-22.19921875 1.47265625)',4326), 900913));
>                  astext
> -------------------------------------------
>  POINT(-2471205.72725849 163953.396913541)
> (1 row)
>
>
> works for me. try dumping your current 900913 srs entry and adding it
> like this.
>
>> but when i see in the map the layer goes a lot km to the north, have
>> some table to pass parameters
>> for convertion bethween this projections, i search but i cannot found
>> any response that tells me
>> how i can do this.
>>
>> very thanks in advance.
>>
>> cheers
>>
>> Felipe
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>
> --
> Christopher Schmidt
> MetaCarta
>



More information about the Dev mailing list