Sorry didn't reply to the list: Hi Thomas,
I'm not using Mapserver but GeoServer so that's not an option. Also the data is used by other programs so I'm stuck with this. The site you mention is about converting coordinates from a projection in meters to a projection in degrees (like from 28992 to 4326) I don't have a coordinate in meters but I have a distance in meters which I want to convert into degrees So that my oracle query looks like SELECT * FROM TABLE1 WHERE SDO_WITHIN_DISTANCE(GEOMETRY, MDSYS.SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(5.16, 52.21, NULL), NULL,NULL), 'distance=0.12234345673475345') = 'TRUE' Where 0.12234345673475345 is just a random number from my keyboard ;-) Instead of SELECT * FROM TABLE1 WHERE SDO_WITHIN_DISTANCE(GEOMETRY, MDSYS.SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(5.16, 52.21, NULL), NULL,NULL), 'distance=25000') = 'TRUE' The second query results always in all records from the table because 25000 degrees as a distance means somewhere far into the universe i guess So the key to my question is how to convert 25 kilometers into a degree like distance so my query understands what I want. Hope you have an answer for me. Cheers Kris -----Original Message----- From: Thomas Maschler [mailto:thomas.masch...@gmx.net] Sent: Friday, March 13, 2009 3:00 PM To: Kris Geusebroek Subject: Re: [OpenLayers-Users] How to convert from meters to degrees for CQL_FILTER DWITHIN Hi Kris have a look here http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.htm But why don't you change the projection to UTM? If you are using Mapserver as a WMS Server you can do this even in the mapfile without toughing your data in the database. Regards Thomas Kris Geusebroek a écrit : > > Hi all, > > I'm using a CQL_FILTER on one of my WMS layers to get all geometries > within a certain distance. > > Problem is that the distance is specified in meters (or kilometers) > but the layer in Oracle Spatial is specified in SRID 4326 (WGS84) > > So the distance is measured at Oracle level in degrees instead of in > meters. > > How can I convert the amount of meters to degrees to supply oracle > with the right information? > > Thanks in advance > > *Kris Geusebroek*** > > Consultant > > * * > > cid:image001.jpg@01C7E4CB.5BC48BD0 > > > > Email: kgeusebr...@xebia.com <mailto:kgeusebr...@xebia.com>__ > > Tel: +31 (0)35 538 1921 > > Fax: +31 (0)35 538 1922 > > Mobile: +31 (0)6 30 697 223 > > http://www.xebia.com <http://www.xebia.fr/> > > > > Utrechtseweg 49 > > 1213 TL Hilversum > > The Netherlands > > *Xebia Blog !* http://blog.xebia.com/ > > *Xebia Podcast!* http://podcast.xebia.com/ > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users