Hi,
I'm using GeoServer 1.5.4 and serving some WMS data onto a Google backdrop
using OpenLayers. However, the data does not line up correctly (the Google
background seems to move a bit to the east). I'm pretty sure my data is
correct since it seems to line up ok with other data using the same CRS.
Cheers,
Jon
--
View this message in context: http://www.nabble.com/British-National-Grid-to-Google-projection-problem-tp14753915p14753915.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Jon,
I'm also trying to overlay WMS data from Geoserver onto Google backdrop
data, but I've been having a difficult time getting it to work. Is the
secret just to turn off the "wrapDateLine" option (false) and limit the map
extent to one "wrap" of the earth? Apparently there is a problem with the
way Geoserver handles data around the date line. Would you mind sending me
the parts of your javascript file that sets up the map, the google layer and
your WMS layer? Maybe I'll even see something you missed about the CRS data
shift problem.
Thanks so much!
Andrew
Jon Britton wrote:
Hi,
I'm using GeoServer 1.5.4 and serving some WMS data onto a Google backdrop
using OpenLayers. However, the data does not line up correctly (the Google
background seems to move a bit to the east). I'm pretty sure my data is
correct since it seems to line up ok with other data using the same CRS.
Cheers,
Jon
--
View this message in context: http://www.nabble.com/British-National-Grid-to-Google-projection-problem-tp14753915p14753936.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Jon Britton ha scritto:
Hi,
I'm using GeoServer 1.5.4 and serving some WMS data onto a Google backdrop
using OpenLayers. However, the data does not line up correctly (the Google
background seems to move a bit to the east). I'm pretty sure my data is
correct since it seems to line up ok with other data using the same CRS.
How much is that bit (in meters?).
Can you share some bits of data to try it out? (I only have USA tiger data).
Cheers
Andrea
I've taken a screenshot and put it here:
http://s256.photobucket.com/albums/hh190/dead_passive/?action=view¤t=googleprob.jpg
Not sure of the exact distance, but it's quite a way off. Below is my code
for setting up the map.
Thanks
Jon
var options = {
projection: "EPSG:900913",
units: "m",
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508,
20037508.34)
};
map = new OpenLayers.Map('map', options);
var layer = new OpenLayers.Layer.Google(
"Google Satellite" , {type: G_SATELLITE_MAP, 'sphericalMercator': true}
);
map.addLayer(layer);
layer = new OpenLayers.Layer.WMS(
"Aerial Photography 2006", "/geoserver/wms",
{
layers: 'fr:walesaerial4percent2468',
styles: '',
srs: 'EPSG:27700',
format: 'image/png',
tiled: 'true',
tilesOrigin : "143.60260815000004,-43.851764249999995"
},
{
'reproject': false,
'wrapDateLine': true,
'buffer': 1
}
);
map.addLayer(layer);
layer = new OpenLayers.Layer.WMS(
"Rivers", "/geoserver/wms",
{
layers: 'fr:rivers_wa_50k',
styles: '',
srs: 'EPSG:27700',
format: 'image/png',
tiled: 'true',
tilesOrigin: "143.60260815000004,-43.851764249999995",
transparent: 'true'
},
{
"sphericalMercator": true,
'wrapDateLine': true,
'buffer': 1
}
);
map.addLayer(layer);
aaime wrote:
Jon Britton ha scritto:
Hi,
I'm using GeoServer 1.5.4 and serving some WMS data onto a Google
backdrop
using OpenLayers. However, the data does not line up correctly (the
background seems to move a bit to the east). I'm pretty sure my data is
correct since it seems to line up ok with other data using the same CRS.How much is that bit (in meters?).
Can you share some bits of data to try it out? (I only have USA tiger
data).
Cheers
Andrea-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
View this message in context: http://www.nabble.com/British-National-Grid-to-Google-projection-problem-tp14753915p14801900.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Jon Britton ha scritto:
I've taken a screenshot and put it here: http://s256.photobucket.com/albums/hh190/dead_passive/?action=view¤t=googleprob.jpg
Not sure of the exact distance, but it's quite a way off.
Indeed it seem to be quite off (is that blue line a river?).
Can you share some little example data I can play with? (a few
easy to identify features in a compressed shapefile by private mail would do fine)
Cheers
Andrea
Yes it's a river, I'll try and find a good dataset to send you. Where should
I send it?
Thanks,
Jon
aaime wrote:
Jon Britton ha scritto:
I've taken a screenshot and put it here:
http://s256.photobucket.com/albums/hh190/dead_passive/?action=view¤t=googleprob.jpgNot sure of the exact distance, but it's quite a way off.
Indeed it seem to be quite off (is that blue line a river?).
Can you share some little example data I can play with? (a few
easy to identify features in a compressed shapefile by private mail
would do fine)Cheers
Andrea-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
View this message in context: http://www.nabble.com/British-National-Grid-to-Google-projection-problem-tp14753915p14802698.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
How does Geoserver implement the reprojection request? I have experienced similar problems in the past when reprojecting from BNG to EPSG 4326. In my case, the problems were the result of incorrect datum transformations (actually, no datum transformation) being performed by GDAL. As I recall, BNG is a projection that requires quite intensive calculations in order to reproject correctly across a large area. It also is not a trivial matter to patch GDAL so that it does the transformation properly. You can see more information about this problem here - http://www.nabble.com/gdal-warp-code-silently-skipping-datum-shift-to3349517.html
This may have been fixed since then, and may not even be the cause of the problem, but it seems similar.
Roger
-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net on behalf of Jon Britton
Sent: Mon 1/14/2008 6:52 AM
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] British National Grid to Google projectionproblem
I’ve taken a screenshot and put it here:
http://s256.photobucket.com/albums/hh190/dead_passive/?action=view¤t=googleprob.jpg
Not sure of the exact distance, but it’s quite a way off. Below is my code
for setting up the map.
Thanks
Jon
var options = {
projection: “EPSG:900913”,
units: “m”,
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508,
20037508.34)
};
map = new OpenLayers.Map(‘map’, options);
var layer = new OpenLayers.Layer.Google(
“Google Satellite” , {type: G_SATELLITE_MAP, ‘sphericalMercator’: true}
);
map.addLayer(layer);
layer = new OpenLayers.Layer.WMS(
“Aerial Photography 2006”, “/geoserver/wms”,
{
layers: ‘fr:walesaerial4percent2468’,
styles: ‘’,
srs: ‘EPSG:27700’,
format: ‘image/png’,
tiled: ‘true’,
tilesOrigin : “143.60260815000004,-43.851764249999995”
},
{
‘reproject’: false,
‘wrapDateLine’: true,
‘buffer’: 1
}
);
map.addLayer(layer);
layer = new OpenLayers.Layer.WMS(
“Rivers”, “/geoserver/wms”,
{
layers: ‘fr:rivers_wa_50k’,
styles: ‘’,
srs: ‘EPSG:27700’,
format: ‘image/png’,
tiled: ‘true’,
tilesOrigin: “143.60260815000004,-43.851764249999995”,
transparent: ‘true’
},
{
“sphericalMercator”: true,
‘wrapDateLine’: true,
‘buffer’: 1
}
);
map.addLayer(layer);
aaime wrote:
Jon Britton ha scritto:
Hi,
I’m using GeoServer 1.5.4 and serving some WMS data onto a Google
backdrop
using OpenLayers. However, the data does not line up correctly (the
background seems to move a bit to the east). I’m pretty sure my data is
correct since it seems to line up ok with other data using the same CRS.How much is that bit (in meters?).
Can you share some bits of data to try it out? (I only have USA tiger
data).
Cheers
Andrea
Check out the new SourceForge.net Marketplace.
It’s the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
View this message in context: http://www.nabble.com/British-National-Grid-to-Google-projection-problem-tp14753915p14801900.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Check out the new SourceForge.net Marketplace.
It’s the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Roger.Andre@anonymised.com ha scritto:
How does Geoserver implement the reprojection request? I have experienced similar problems in the past when reprojecting from BNG to EPSG 4326. In my case, the problems were the result of incorrect datum transformations (actually, no datum transformation) being performed by GDAL. As I recall, BNG is a projection that requires quite intensive calculations in order to reproject correctly across a large area. It also is not a trivial matter to patch GDAL so that it does the transformation properly. You can see more information about this problem here - http://www.nabble.com/gdal-warp-code-silently-skipping-datum-shift-to3349517.html
This may have been fixed since then, and may not even be the cause of the problem, but it seems similar.
Hmmm... GeoServer uses the official EPSG database for transformations,
and in particular it's using a 7 parameters Bursa-Wolf transform (or
Helmert transform) with the following parameters (see the towgs84 section):
PROJCS["OSGB 1936 / British National Grid",
GEOGCS["OSGB 1936",
DATUM["OSGB 1936",
SPHEROID["Airy 1830", 6377563.396, 299.3249646, AUTHORITY["EPSG","7001"]],
TOWGS84[446.448, -125.157, 542.06, 0.15, 0.247, 0.842, -4.2261596151967575],
AUTHORITY["EPSG","6277"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4277"]],
PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]],
PARAMETER["central_meridian", -2.0],
PARAMETER["latitude_of_origin", 49.0],
PARAMETER["scale_factor", 0.9996012717],
PARAMETER["false_easting", 400000.0],
PARAMETER["false_northing", -100000.0],
UNIT["m", 1.0],
AXIS["Easting", EAST],
AXIS["Northing", NORTH],
AUTHORITY["EPSG","27700"]]
It is not nearly as accurate as a grid based method, but as you
notice, grid based ones are much more expensive (not sure
we even have the code to apply a grid based transform).
Yet, it seems to me the offset between the blue line
and what I imagine is the actual river in the photo
is around the 50-100 meters:
http://s256.photobucket.com/albums/hh190/dead_passive/?action=view¤t=googleprob.jpg
I'm no projection expert, but that much error seems
too much even for the 7 params transform (the error
should be more in the 2-10 meters range as far as I've been told).
Cheers
Andrea
It's hard for me to see the vector in relation to the image in that link
(I'm on a laptop and the image is very small, even when viewed
full-size.) If the offset is strictly North/South, it could simply be
an incorrect false northing being specified in the projection parameter
of the EPSG database. Although the EPSG params are usually very good,
they are not infallible. However, if the projection error is offset
east/west as well, I would be willing to bet money on it being a datum
transformation error. My suggestion would be to extract a small section
of the image from the original data and then test the reprojection using
a couple different utilities. Try reprojecting with gdalwarp using just
the EPSG:code specification, as well as the full proj.4 parameter string
with the TOWGS84 param in-line.
I doubt this is a Geoserver-related problem.
--
Roger
-----Original Message-----
From: Andrea Aime [mailto:aaime@anonymised.com]
Sent: Monday, January 14, 2008 10:30 AM
To: Andre, Roger/SEA
Cc: man_kills_everything@anonymised.com;
geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] British National Grid to Google
projectionproblem
Roger.Andre@anonymised.com ha scritto:
How does Geoserver implement the reprojection request? I have
experienced similar problems in the past when reprojecting from BNG to
EPSG 4326. In my case, the problems were the result of incorrect
datum transformations (actually, no datum transformation) being
performed by GDAL. As I recall, BNG is a projection that requires
quite intensive calculations in order to reproject correctly across a
large area. It also is not a trivial matter to patch GDAL so that it
does the transformation properly. You can see more information about
this problem here -
http://www.nabble.com/gdal-warp-code-silently-skipping-datum-shift-to3
349517.htmlThis may have been fixed since then, and may not even be the cause of
the problem, but it seems similar.
Hmmm... GeoServer uses the official EPSG database for transformations,
and in particular it's using a 7 parameters Bursa-Wolf transform (or
Helmert transform) with the following parameters (see the towgs84
section):
PROJCS["OSGB 1936 / British National Grid",
GEOGCS["OSGB 1936",
DATUM["OSGB 1936",
SPHEROID["Airy 1830", 6377563.396, 299.3249646,
AUTHORITY["EPSG","7001"]],
TOWGS84[446.448, -125.157, 542.06, 0.15, 0.247, 0.842,
-4.2261596151967575],
AUTHORITY["EPSG","6277"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4277"]],
PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]],
PARAMETER["central_meridian", -2.0],
PARAMETER["latitude_of_origin", 49.0],
PARAMETER["scale_factor", 0.9996012717],
PARAMETER["false_easting", 400000.0],
PARAMETER["false_northing", -100000.0],
UNIT["m", 1.0],
AXIS["Easting", EAST],
AXIS["Northing", NORTH],
AUTHORITY["EPSG","27700"]]
It is not nearly as accurate as a grid based method, but as you notice,
grid based ones are much more expensive (not sure we even have the code
to apply a grid based transform).
Yet, it seems to me the offset between the blue line and what I imagine
is the actual river in the photo is around the 50-100 meters:
http://s256.photobucket.com/albums/hh190/dead_passive/?action=view&curre
nt=googleprob.jpg
I'm no projection expert, but that much error seems too much even for
the 7 params transform (the error should be more in the 2-10 meters
range as far as I've been told).
Cheers
Andrea
The offset is east/west. I've just realised that I'm sort of forcing
GeoServer to use BNG (27700) when setting up the layer because it doesn't
detect it automatically. However, I've got data from multiple sources, all
claiming to use BNG and they seem to line up fine with each other.
In GeoServer, The Native SRS WKT is:
PROJCS["British_National_Grid", GEOGCS["GCS_OSGB_1936", DATUM["D_OSGB_1936",
SPHEROID["Airy_1830", 6377563.396, 299.3249646]], PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295], AXIS["Lon", EAST], AXIS["Lat",
NORTH]], PROJECTION["Transverse_Mercator"], PARAMETER["central_meridian",
-2.0], PARAMETER["latitude_of_origin", 49.0], PARAMETER["scale_factor",
0.999601272], PARAMETER["false_easting", 400000.0],
PARAMETER["false_northing", -100000.0], UNIT["m", 1.0], AXIS["x", EAST],
AXIS["y", NORTH]]
Which is different to the one it's using:
PROJCS["OSGB 1936 / British National Grid", GEOGCS["OSGB 1936", DATUM["OSGB
1936", SPHEROID["Airy 1830", 6377563.396, 299.3249646,
AUTHORITY["EPSG","7001"]], TOWGS84[446.448, -125.157, 542.06, 0.15, 0.247,
0.842, -4.2261596151967575], AUTHORITY["EPSG","6277"]], PRIMEM["Greenwich",
0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4277"]], PROJECTION["Transverse Mercator",
AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", -2.0],
PARAMETER["latitude_of_origin", 49.0], PARAMETER["scale_factor",
0.9996012717], PARAMETER["false_easting", 400000.0],
PARAMETER["false_northing", -100000.0], UNIT["m", 1.0], AXIS["Easting",
EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","27700"]]
Could this be the source of my problem?
I've got some data to play around with if you want, but don't know where to
send it.
Thanks,
Jon
Roger.Andre wrote:
It's hard for me to see the vector in relation to the image in that link
(I'm on a laptop and the image is very small, even when viewed
full-size.) If the offset is strictly North/South, it could simply be
an incorrect false northing being specified in the projection parameter
of the EPSG database. Although the EPSG params are usually very good,
they are not infallible. However, if the projection error is offset
east/west as well, I would be willing to bet money on it being a datum
transformation error. My suggestion would be to extract a small section
of the image from the original data and then test the reprojection using
a couple different utilities. Try reprojecting with gdalwarp using just
the EPSG:code specification, as well as the full proj.4 parameter string
with the TOWGS84 param in-line.I doubt this is a Geoserver-related problem.
--
Roger-----Original Message-----
From: Andrea Aime [mailto:aaime@anonymised.com]
Sent: Monday, January 14, 2008 10:30 AM
To: Andre, Roger/SEA
Cc: man_kills_everything@anonymised.com;
geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] British National Grid to Google
projectionproblemRoger.Andre@anonymised.com ha scritto:
How does Geoserver implement the reprojection request? I have
experienced similar problems in the past when reprojecting from BNG toEPSG 4326. In my case, the problems were the result of incorrect
datum transformations (actually, no datum transformation) being
performed by GDAL. As I recall, BNG is a projection that requires
quite intensive calculations in order to reproject correctly across a
large area. It also is not a trivial matter to patch GDAL so that it
does the transformation properly. You can see more information about
this problem here -
http://www.nabble.com/gdal-warp-code-silently-skipping-datum-shift-to3
349517.htmlThis may have been fixed since then, and may not even be the cause of
the problem, but it seems similar.Hmmm... GeoServer uses the official EPSG database for transformations,
and in particular it's using a 7 parameters Bursa-Wolf transform (or
Helmert transform) with the following parameters (see the towgs84
section):PROJCS["OSGB 1936 / British National Grid",
GEOGCS["OSGB 1936",
DATUM["OSGB 1936",
SPHEROID["Airy 1830", 6377563.396, 299.3249646,
AUTHORITY["EPSG","7001"]],
TOWGS84[446.448, -125.157, 542.06, 0.15, 0.247, 0.842,
-4.2261596151967575],
AUTHORITY["EPSG","6277"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4277"]],
PROJECTION["Transverse Mercator", AUTHORITY["EPSG","9807"]],
PARAMETER["central_meridian", -2.0],
PARAMETER["latitude_of_origin", 49.0],
PARAMETER["scale_factor", 0.9996012717],
PARAMETER["false_easting", 400000.0],
PARAMETER["false_northing", -100000.0],
UNIT["m", 1.0],
AXIS["Easting", EAST],
AXIS["Northing", NORTH],
AUTHORITY["EPSG","27700"]]It is not nearly as accurate as a grid based method, but as you notice,
grid based ones are much more expensive (not sure we even have the code
to apply a grid based transform).Yet, it seems to me the offset between the blue line and what I imagine
is the actual river in the photo is around the 50-100 meters:
http://s256.photobucket.com/albums/hh190/dead_passive/?action=view&curre
nt=googleprob.jpgI'm no projection expert, but that much error seems too much even for
the 7 params transform (the error should be more in the 2-10 meters
range as far as I've been told).Cheers
Andrea-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
View this message in context: http://www.nabble.com/British-National-Grid-to-Google-projection-problem-tp14753915p14836129.html
Sent from the GeoServer - User mailing list archive at Nabble.com.