[Geoserver-users] Generated sql boundingbox bug?

Hello Geoserver People,

I've got a curious bug happening to me. At a particular scale at a particular place, Im getting missing "land". Australia, where I live, doesn't show up, neither does most of south east asia, japan, korea and NZ.

This is the WMS request

http://xxxxx:xx80/geoserver/wms?STYLES=&bbox=45.0,-90.0,270,90.0&bgcolor=#99B3CC&format=image%2Fjpeg&height=1024&layers=psma:worldborders&request=GetMap&service=WMS&srs=EPSG%3A4326&version=1.1.1&width=1280

This is the sql called according to the logs

SELECT distinct "cntry_name" FROM "public"."worldborders" WHERE "the_geom" && GeometryFromText('POLYGON ((-135.17578125000003 -89.82421875000578, -135.17578125000003 89.82421875000578, 90.17578125000003 89.82421875000578, 90.17578125000003 -89.82421875000578, -135.17578125000003 -89.82421875000578))', 4283);

I couldn't help noticing the "where" clause. Im presuming && means geometry interception (which would make sense). If so then NO data east of about 90.17578 longitude will be displayed. Well that would expain it! As you can see my original wms request bounding box wants the longitudes between 45 --> 270.

I anticpate the following questions:...
Q: Are you sure the sql is generated due to that particular wms request?
A: Yes, Absolutly! I was tailing the logs and only doing one request.

Q: Why are you specifing a bounding box greater than 180?
A: This occurs when I was populating our Tile cache using meta tiling.

Thanks for any help

Martin Vivian

Hi Martin,

So first off the "&&" actually means bounds intersection and not geometry intersection. So playing with my own dataset i was able to reproduce this problem.

Something definitely seems to be off when the request bounding box gets
back projected into 4283. I am far from an expert when it comes to crs stuff but my best guess is this. Since the request specifies coordinates outside the bounds of 4326, when the transformation occurs they get transformed to points which do fall within 4283 instead of appended off the end of the world. One of our crs experts should be able to confirm this or not.

When I make the request srs 4238 i get the correct results. Not sure if that is an acceptable option for you.

-Justin

Martin Vivian wrote:

Hello Geoserver People,

I've got a curious bug happening to me. At a particular scale at a particular place, Im getting missing "land". Australia, where I live, doesn't show up, neither does most of south east asia, japan, korea and NZ.

This is the WMS request

http://xxxxx:xx80/geoserver/wms?STYLES=&bbox=45.0,-90.0,270,90.0&bgcolor=#99B3CC&format=image%2Fjpeg&height=1024&layers=psma:worldborders&request=GetMap&service=WMS&srs=EPSG%3A4326&version=1.1.1&width=1280

This is the sql called according to the logs

SELECT distinct "cntry_name" FROM "public"."worldborders" WHERE "the_geom" && GeometryFromText('POLYGON ((-135.17578125000003 -89.82421875000578, -135.17578125000003 89.82421875000578, 90.17578125000003 89.82421875000578, 90.17578125000003 -89.82421875000578, -135.17578125000003 -89.82421875000578))', 4283);

I couldn't help noticing the "where" clause. Im presuming && means geometry interception (which would make sense). If so then NO data east of about 90.17578 longitude will be displayed. Well that would expain it! As you can see my original wms request bounding box wants the longitudes between 45 --> 270.

I anticpate the following questions:...
Q: Are you sure the sql is generated due to that particular wms request?
A: Yes, Absolutly! I was tailing the logs and only doing one request.

Q: Why are you specifing a bounding box greater than 180?
A: This occurs when I was populating our Tile cache using meta tiling.

Thanks for any help

Martin Vivian

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org