Hi Christopher thanks for your reply. None of my data is is EPSG:4326 and neither is the map. The data is EPSG:3004 and everthing else is spherical mercator. EPSG:4326 is only used in the displayProjection. Is this ok ?
Yes, I have tested both Google and VE. Google and VE actually correspond when I look at the roads layer. I had not noticed this previously. The Google imagery is bad (in this area) therefore I ignore it. However my data is off. Note that I have imported this same data into Google *EARTH* (i.e. in EPSG:4326) and it overlayed fine. I also overlay it on my orthophotos so I am sure about it's accuracy. I think it may be due to this problem with Proj.4. I am using the version that comes with Mapserver binaries for windows (version number is not specified). Judging from the dates of the binaries it may be 4.4.7. Is that old ? I tried googling the problem you mentioned but got no hits. Could you send me some link or tell me how to go about diagnosing that problem in my setup ? Thanks again. Christopher Schmidt-4 wrote: > > On Fri, Aug 08, 2008 at 01:02:31PM -0700, George.Muammar wrote: >> The road layer (Teleatlas / Navteq) comes in UTM - WGS84 and I also >> combine >> it with my cadastral data. I play with these projections every day and >> are >> very confident with them - but not so with the so called "spherical >> mercator" > > Using Google Maps in EPSG:4326 *must* lead to offsets within OpenLayers. > There is no possible way to avoid this, as Google Maps data is > *projected* data, and EPSG:4326 is a 'flat' projection, using lat/lon as > planar units. The end result is that there is no way that you can > correctly overlay data on top of Google Maps, Virtual Earth, or any > other commercial baselayer. > > However, reading the following, I realize you are using spherical > mercator? At least, I Think? In which case, the answer is "yes, I have > used this with 'very accurate maps', and had no problems getting pixel > perfect overlays on top of Google Maps. However, I have also seen > significant offsets, *especially* in VirtualEarth (in the 100M range) > even in areas where I would typicaly expect better results. > (Specifically, New Orleans in VE at some zoom levels is *bad*.) > > I don't see anything wrong with your configuration here; Have you tried > laying over Google instead? > > Another comment is that it is possible that your proj.4 version may > affect things: I've heard people reporting problems with older proj.4 > libraries not respecting the [EMAIL PROTECTED] hack. > > Just a few thoughts. > >> >> Does anybody have any opinion in the matter ? has anyone tried to overlay >> Google / VE / Yahoo with very accurate maps ? >> >> For the record I am doing the following: (maybe something wrong) >> >> projections in Proj.4 epsg file: >> >> # Spherical Mercator for Google etc. >> <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 [EMAIL PROTECTED] +no_defs >> # GAUSS BOAGA EST >> <3004> +proj=tmerc +lat_0=0 +lon_0=15.0 +k=0.999600 +x_0=2520000 +y_0=0 >> +ellps=intl +pm=0 +units=m no_defs <> >> >> >> I define my map thus: >> var smproj = new OpenLayers.Projection("EPSG:900913"); >> >> mapOptions = { >> projection: smproj, >> units: "m", >> displayProjection: geoproj >> }; >> >> >> my layers thus: >> var hyblayer = new OpenLayers.Layer.VirtualEarth( .... >> 'sphericalMercator': true}); >> >> var pmwms = new OpenLayers.Layer.WMS( ..... >> {'projection': smproj}); >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/Conversion-to-Spherical-Mercator---100m-error-tp18898188p18898188.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Users mailing list >> Users@openlayers.org >> http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > > -- View this message in context: http://www.nabble.com/Conversion-to-Spherical-Mercator---100m-error-tp18898188p18916328.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users