Or if your database backend supports spatial fields, you can let the
database to do the hard work and use Geodjango (built-in GIS extension)
which supports spatial operations like query by distance within.

I think most standard databases can do that (mysql, postgresql, sqlite,
oracle) but I would recommend postgres + postgis if possible.

Then everything is just matter of taste, you can pick pretty much any
coordinate system and you get the results you want. No math involved.

On Mon, Jul 16, 2012 at 2:12 AM, JJ Zolper <codinga...@gmail.com> wrote:

> I'm also thinking since Northern VA is so big in terms of people if I get
> a good thing going here I can port that to other major cities but if I find
> a less server heavy method I can use that for smaller areas possibly. Not
> sure, I'll see.
>
> JJ
>
>
> On Sunday, July 15, 2012 1:22:10 PM UTC-4, Nicolas Emiliani wrote:
>>
>>
>>
>> What you have just explained seems to be a good option! Is the option to
>>> use latitude and longitude a very common one? I'm not
>>> as familiar as to which options of calculation have known to be the most
>>> stable, usable, fast, or efficient. Or there is any common
>>> knowledge about the such thing.
>>>
>>
>> Well with (lat, long) you can point to any place on earth, it's like
>> having an (x,y) point on a cartesian plane.
>> And yes, it is the standard method.
>>
>>
>>>
>>> Here's what I'm thinking. First the user enters their town for example
>>> so Vienna, VA. Then they choose how far from their location so 25 miles.
>>> But then they also have an advanced search option where they can refine
>>> their request even more. They are able to play around with a Google Map on
>>> the side and zoom into their physical house location on the map and put a
>>> marker/point there of some sort. This could be lat/long I don't know yet.
>>> This way if that data checks out they get and even more accurate
>>> representation of the artists in their area. Any thoughts or opinions on
>>> how you think I
>>> should go about this?
>>>
>>>
>> With the (lat,long) that belongs to the user position yo can then ask for
>> a radius in blocks, meters o whatever.
>> So, now you can get the surface of a circle and with some basic math you
>> go through your db checking if any artist
>> are inside the limit of that circle.
>>
>>
>>> Thanks so much!
>>>
>>> JJ
>>>
>>> On Sunday, July 15, 2012 10:22:53 AM UTC-4, Nicolas Emiliani wrote:
>>>>
>>>>
>>>>
>>>> On Sun, Jul 15, 2012 at 1:58 AM, JJ Zolper <codinga...@gmail.com>wrote:
>>>>
>>>>> So heres my goal:
>>>>>
>>>>> The user logins in and goes to a discover page. They enter a distance
>>>>> from their location as the requested results scope. Lets say 25 miles from
>>>>> where I live for example. Additionally they could pick like a genre or
>>>>> music but not as important.
>>>>>
>>>>> So they hit seach and see in a 25 mile spanse in all directions in a
>>>>> circle form the closest artists to their location. From there they can see
>>>>> the top result and click that and step through the top results from 1 to 2
>>>>> to 3.... To top 10 and so on as much as their heart desires.
>>>>>
>>>>> So i was thinking maybe GeoIP might be good because it will use the
>>>>> users location and last known GeoIP of the artist for example.
>>>>>
>>>>>
>>>> I'm currently developing a project based on google maps, and it sounds
>>>> that you might want to take a look at their API,
>>>> You could use markers (latitude and longitude) for your artists, ask
>>>> the user to place themselves on the map and then
>>>> calculate if they are on the wanted area or not.
>>>>
>>>> https://developers.google.com/**maps/<https://developers.google.com/maps/>
>>>>
>>>> I was curious if anyone had any ideas or better ideas then I had.
>>>>>
>>>>> Thanks so much,
>>>>>
>>>>> JJ Zolper
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Django users" group.
>>>>> To view this discussion on the web visit https://groups.google.com/d/*
>>>>> *msg/django-users/-/_**ERIIZrolmUJ<https://groups.google.com/d/msg/django-users/-/_ERIIZrolmUJ>
>>>>> .
>>>>> To post to this group, send email to django-users@googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> django-users+unsubscribe@**googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>>>>> .
>>>>> For more options, visit this group at http://groups.google.com/**
>>>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>>>> .
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Nicolas Emiliani
>>>>
>>>> Lo unico instantaneo en la vida es el cafe, y es bien feo.
>>>>
>>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/xqKHuCVictIJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to