For example I have taken boundingbox values of london which can be compared with the latitude and longitude values in the property table and get all the properties in the london. My question is how to achieve something if user wants to get the properties within the london + 1 mile from the london (1 mile from boundaries of london). How to make the bounding box values bigger to fit to the given radius or alternate solution would do good asked 18 Jun '15, 16:25 krishkona
showing 5 of 6
show 1 more comments
|
I'm not sure what exactly you're doing and what it has to do with OSM, however you could probably solve your problem by just increasing the size of the bounding box, e.g. by 0.01 degrees all around. answered 19 Jun '15, 08:38 rorym Hii, Using OSM got the bounding boxes of location for example say london , Now I would like to compare all the latitude and longitudes in another table with this boundingbox values to get the values which fall inside the boundinx box and also if user wants properties which are 1 mile or 2 mile away from london i would like to increase the boounding values to get the accurate results
(19 Jun '15, 09:36)
krishkona
|
If you want to do maths on the surface of a sphere "properly" then this is what you should be using, but if you're only dealing with things at around one latitude, then as people have previously suggested it's easier to use a rougher conversion from distance to degrees in each direction. answered 19 Jun '15, 09:06 SomeoneElse ♦ Hii, Using OSM got the bounding boxes of location for example say london , Now I would like to compare all the latitude and longitudes in another table with this boundingbox values to get the values which fall inside the boundinx box and also if user wants properties which are 1 mile or 2 mile away from london i would like to increase the boounding values to get the accurate results.Can you clarify whether the boundingboxes are boundary values of location please
(19 Jun '15, 09:36)
krishkona
sql query SELECT * FROM table WHERE lat BETWEEN min_lat AND max_lat AND lng BETWEEN min_lng AND max_lng here min max latitude and longitude values are bounding box values I want to achieve similar to zooplasearch
(19 Jun '15, 09:44)
krishkona
2
use a DB with geographical datatype "where st_within(place,bbox)" & then you can use a buffer to achieve your result.
(19 Jun '15, 12:39)
SK53 ♦
|
Can you explain in a little more detail what you are trying to do, and what it has to do with OpenStreetMap?
Hii, I have bounding box values for user given location. I can search for the locations that fall in between those bounding boxes which I have achieved, but I want locations within the given bounding box + locations which are with a given radius(for example 1 mile ) from those bounding values. I want to achievesomething similar to zoopla search
I need to send email alerts to the people who have saved their search so basically I have stored their boundingboxes in tblemail alerts and match with latitude and longitude values of property table.I want to know howto achieve the radius
when you have a bounding BOX, how do you increase then the RADIUS?
Why not simply make the bounding box a little bit bigger??
For example I have taken boundingbox values of london which can be compared with the latitude and longitude values in the property table and get all the properties in the london. My question is how to achieve something if user wants to get the properties within the london + 1 mile from the london (1 mile from boundaries of london). How to make the bounding box values bigger to fit to the given radius or alternate solution would do good
Like @stephan75 suggested, why not just shift the latitude and longitude values in the bounding box by 1 mile? At London, that would be approximately 0.0145 degrees of latitude and 0.0233 degrees of longitude.