R: [postgis-users] degree vs. metric projection performance?

P.Rizzi Ag.Mobilità Ambiente paolo.rizzi at ama-mi.it
Wed Nov 26 06:18:29 PST 2008


Following is what I found out about this matter.
Mind you: I did _not_ tested it very well...!!!

Bye
Paolo Rizzi

--------------------------------------------------------------
.) Since version 6.15, in the EPSG database exists a new SRID:
	3785

that should be used to project coordinates like GoogleMaps, VirtualHearth, etc.
All those systems store, input and output coordinates as WGS84 (SRID:4326),
but to draw maps they use a specifical projection that was, in the end,
received by EPSG.

To add this CRS to PostGIS, you can use the following SQL fragment:
------------------------------------------------------------------
---
--- To insert into spatial_ref_sys, if missing, the CSR:
---
--- EPSG 3785 : Popular Visualisation CRS / Mercator
---
--- If already present, no change is done.
---
INSERT INTO "spatial_ref_sys" 
select
3785 as srid,
'EPSG' as auth_name,
3785 as auth_srid,
'PROJCS["Popular Visualisation CRS / Mercator", GEOGCS["Popular Visualisation CRS", DATUM["Popular Visualisation Datum", SPHEROID["Popular Visualisation Sphere", 6378137, 0, AUTHORITY["EPSG",7059]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY["EPSG",6055]], PRIMEM["Greenwich", 0, AUTHORITY["EPSG", "8901"]], UNIT["degree", 0.0174532925199433, AUTHORITY["EPSG", "9102"]], AXIS["E", EAST], AXIS["N", NORTH], AUTHORITY["EPSG",4055]], PROJECTION["Mercator"], PARAMETER["False_Easting", 0], PARAMETER["False_Northing", 0], PARAMETER["Central_Meridian", 0], PARAMETER["Latitude_of_origin", 0], UNIT["metre", 1, AUTHORITY["EPSG", "9001"]], AXIS["East", EAST], AXIS["North", NORTH], AUTHORITY["EPSG",3785]]'
	as srtext,
'+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'
	as proj4text
where not exists(select 1 from "spatial_ref_sys" where "srid"=3785);
------------------------------------------------------------------

.) See also:
	http://www.iter.dk/post/2008/05/SphericalWeb-Mercator-EPSG-code-3785.aspx
	http://spatialreference.org/ref/user/google-projection/
	http://forums.oracle.com/forums/thread.jspa?messageID=2684150&tstart=0
		(for Oracle)
--------------------------------------------------------------



> -----Messaggio originale-----
> Da: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net]Per 
> conto di Obe,
> Regina
> Inviato: mercoledì 26 novembre 2008 15.06
> A: PostGIS Users Discussion
> Oggetto: RE: [postgis-users] degree vs. metric projection performance?
> 
> 
> 
> >  By the way, are the Google Mercator and WGS84 systems equivalent
> 
> No they aren't.  I think Google is a mercator meter 
> projection (not good
> for measurement though but more or less good for 
> presentation) and they
> use WGS84 datum when accepting data.  I think it actually has an
> official SRID (could be wrong)
> that is EPSG:900913
> 
> and proj4 looks like this
> 
> +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
> 
> People usually plot WGS84 longlat (4326) on Google Maps, thus the
> confusion.
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> -----------------------------------------
> The substance of this message, including any attachments, may be
> confidential, legally privileged and/or exempt from disclosure
> pursuant to Massachusetts law. It is intended
> solely for the addressee. If you received this in error, please
> contact the sender and delete the material from any computer.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 



More information about the postgis-users mailing list