if your activity is commercial, google will make you pay. Geodjango with
OSM is free - and OSM is more accurate than google and the raw data is
available. Also look at openlayers - that may fulfill your needs without
geodjango.
--
regards
Kenneth Gonsalves
The benefits beyond that include things like being able to query your
data for points within a bounding box, or create a buffer around a point
to select nearby points, or test if you're points intersect with other
features of interest.
Thanks,
Alex
> I'm currently building my first Django-based app, which is proceeding
> fairly well, thus far. One of the goals is to allow users to post
> information (text, pics, video) and for the app to be able to
> automatically detect the location where they posted this information.
> That data would then ideally be able to be filtered later, such as
> viewing the posts that were made within a specific radius.
Points or a pair od coordinates are simple to perssit, you do not
necessarily have to persist it using geo formats , so you do not need
a orm or database that understand GEO DATA.
But, what you going to do with this informatios later ?
just keep it in a database and show in a map [1]? or you will need
spatial queries [2]?
Case 1 - you just need a frontend to get coordnates in your braowser
window and pass to your app throught JS.
Case 2 - you may use a spaytial database to do the job just like any
other query ( GeoDjango can do that for you)
> I've been reading a bit about GeoDjango and it sounds intriguing. A
> colleague, though, suggested everything that can be done using
> GeoDjango is equally efficient utilizing the Google Maps API with
> JavaScript or JQuery to obtain the proper coordinates.
> Essentially, I'm looking to see what benefits GeoDjango would give
> this project over using just the Google Maps API. If I've already
> started a project in basic Django, is incorporating GeoDjango
> problematic? I'm still attempting to master the basics of Django and
> venturing into GeoDjango may be too much. Or not.
GeoDjanfgo among other thing gives you the ORM and Geo functions, like
projections import export, and geo classes
for |Geometrie like Point !
You can use GeoDjango TOGETHER with Google, Open Layers AND both with Jquery
You may use the maps from Google, but the Frontend interface from OpenLayers.
Google gives you = Maps + interface
OpenLayers = Just the interface (really nice by the way)
But some times.... its easier and fast just use Google maps API.
... but doenst mather ... google or openlayers, if you need SPATIAL
QUERIES in Django its = GeoDjango. (or rediscovery the wheel)
May be this project can help you http://pythonpeople.znc.com.br/ its
on github https://github.com/znc-sistemas/python-people
The code is not beautiful, I made this app in a cople days, and then
poeple start to sign in...
I use to use Open Layers, and this app was the firts one where the
frontend was entirely build with GoogleMaps API.... but geodjango
inside!
hope this help
Essentially, I'm looking to see what benefits GeoDjango would give
this project over using just the Google Maps API. If I've already
started a project in basic Django, is incorporating GeoDjango
problematic? I'm still attempting to master the basics of Django and
venturing into GeoDjango may be too much. Or not.
* You'll want to add a line ``objects = GeoManager`` on each model that you will want to perform geospatial queries against.
that's the point. it seems easy, until you write some SQL to express
the 'nearby' criteria... and find that you're doing a very expensive
full-table scan.
a GIS database handles spatial indexes, so queries like "order by
distance to this point, retrieve the 20 closest" or "all points inside
this polygon" are done quickly and efficiently no matter the number of
points in the database.
Postgres and SQLite handle these type or queries; some MySQL versions
can deal a few of them. better go with Postgres, as it's far more
tested (and used by core developers)
--
Javier
GeoDjango though, to be honest, sounds frightening and extremely
advanced. I've been reviewing the installation requirements and, at
least according to how these were written, is intense and ripe for
many errors.
Part of the qualms I'm having is I've been developing on
the internal sqlite3 database. According to most of the documentation,
Postgres with GIS is recommended. This is concerning.
Essentially, I want to be able to have the application immediately
detect a users longitude and latitude and have all the content they
contribute be identified with those coordinates.
I'd like a map illustrating their location to appear with each content post.
Finally, I want to provide users the ability to search for nearby posts or
within a certain boundary (from the documentation I've read, this is
what GeoDjango apparently excels at).
I'm on a Mac. The Django GeoDjango installation instructions are
somewhat obtuse and there aren't alternative sites I've found with
more straightforward instructions. It's lame that these are confusing
but, well, they are. I will no doubt review the sites you recommended.
As a newcomer who suddenly feels he may be biting off more than he can
chew, one of my worries it that if I utilize the sqlite3 database for
development with Spatialite, when I finally deploy this to, say, a
Postgres database, it won't transition correctly. This is most likely
due to my naiveté about databases, but I'm just concerned once it's
deployed, it won't work because I screwed something up by using
sqlite3 and I'm now trying to use another type of database.
From your textbook descriptions (awesome) it seems that GeoIP is what
I'm looking for. Essentially, a logged-in user's coordinates would be
taken from their IP address (not sure if GeoDjango has a way to do
this without front-end JS work (more terror))
The problem with using HTML5 is, while it seems easy (there's pre-
formatted code out there that makes it a cinch to identify IP
location), it really provides no simple way to store or search for
content that's identified via GeoIP.
- GeoDjango using the GeoIP features
- OpenLayers (have heard about it; need to research more)
- Google Maps or another mapping service, being wary of limits