[Proj] Problem overlaying georeferenced images in Google, Maps(projection problem!)

Jorge jorge.arevalo at gmail.com
Fri May 30 05:45:25 EDT 2008


>/ Eric Miller wrote:
/>/ > Yes, Google maps uses a spherical model rather than
/>/ > ellipsoidal (hence, +a == +b in the destination coordinate
/>/ > system).  So, it's not really WGS84.  However, my
/>/ > understanding is that GMaps projection assumes there
/>/ > isn't any difference.  So, source coordinates should be
/>/ > converted to Geodetic on the WGS84 ellipsoid/datum and then
/>/ > projected onto the Google Mercator "WGS84" sphere
/>/ > ignoring the fact that the models are really different.  So,
/>/ > the +towgs84 parameter on the destination should probably be
/>/ > defined as +towgs84=0,0,0.
/>/ 
/> Frank wrote:
>/ > I haven't followed this issue closely, but please be
/>/ > sure you are aware of:
/>/ > http://trac.osgeo.org/proj/wiki/FAQ#ChangingEllipsoidWhycantIconvertfromWGS84toVirtualEarthMercator
/
Hamish wrote:
> ah, ok. I happened to be looking at this problem yesterday WRT OpenStreetMap's PostgreSQL exporter -m flag (->Mapnik):
> http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/reprojection.c#L14
> 
> One thing I don't understand in that is what the "+over" term is for.
> It is new to me.
> 
> 
> Also, Jorge- is that 3785 EPSG term for Google's merc a new official EPSG one or a custom thing? if a custom thing maybe it is better to stick with 
> <900913> "Chris' funny epsgish code for the google mercator"
> (from /usr/share/proj/esri.extra)
> ?
> 
>
> Hamish

The EPSG code 3785 is a custom one, but the same of 900913 (I didn't know it thanks), except for the "+wktext" term. What does it mean?

OK, I'm lost with this issue. Could my calcs be wrong? I have, for example, this image:
http://www.nebulared.com/tmp_geo/UTM_ED50_Balearic_Island.png

And is georeferenced by this world file:
http://www.nebulared.com/tmp_geo/UTM_ED50_Balearic_Island.wld

The image is obtained for a MIF/MID couple of files with UTM projection, zone 30, ED50 datum (Mapinfo said... I don't know what 
are the dX, dY, dZ parameters, buth they must be -84, -107, -120). Really, the raster file obtained from MIF/MID files isn't a
PNG file, but I did the transform to "see" what I was doing.

OK, I need to reproject the image, and the output image must be used to overlay it in a GMaps' frame. This is my last attempt:

gdalwarp 
	-s_srs "+init=epsg:23030 +towgs84=-84,-107,-120,0,0,0,0" 
	-t_srs "+init=epsg:3785 +towgs84=0,0,0,0,0,0,0" 
	-tr 250 250 
	-co INTERLEAVE=PIXEL 
	UTM_ED50_Balearic_Island.png
	GMaps_Balearic_Island.tif

Then, I transform the TIFF file in a PNG (transformation OK) and I have this image:
http://www.nebulared.com/tmp_geo/GMaps_Balearic_Island.png

But the image doesn't fit exactly in the map... Is there any error in this reprojection? If the projection is OK, I need to review
the rest of the code...

Thanks a lot!







More information about the Proj mailing list