NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

krishkona
8224
accept rate: 0%

edited 18 Jun '15, 17:01

2

Can you explain in a little more detail what you are trying to do, and what it has to do with OpenStreetMap?

(18 Jun '15, 16:31) SomeoneElse ♦

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

(18 Jun '15, 16:46) krishkona

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

(18 Jun '15, 16:51) krishkona
1
  1. when you have a bounding BOX, how do you increase then the RADIUS?

  2. Why not simply make the bounding box a little bit bigger??

(18 Jun '15, 16:53) stephan75

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

(18 Jun '15, 16:58) krishkona

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.

(18 Jun '15, 18:14) alester
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.

permanent link

answered 19 Jun '15, 08:38

rorym's gravatar image

rorym
5.4k1449100
accept rate: 11%

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.

permanent link

answered 19 Jun '15, 09:06

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

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 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×129

question asked: 18 Jun '15, 16:25

question was seen: 4,758 times

last updated: 19 Jun '15, 12:39

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum