Re: Confused about GeoDjango and PostGIS

2012-04-26 Thread vishy
I am having trouble converting latitude and longitude. Both are in double precision in the table. So, I am doing this UPDATE my_table SET geom = ST_PointFromText('POINT(' || longitude ||' '|| latitude ||')', 4326) But, when I do this SELECT ST_PointFromText(geom ) FROM my_table I am getting an

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
thanks. This is what I have done. On Apr 26, 9:57 am, Jani Tiainen wrote: > 25.4.2012 19:17, vishy kirjoitti: > > > Hi, > > > I need to do spatial queries like find places within 5 miles of a > > location given in latitude and longitude. So, I am thinking of > > exploring

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread Jani Tiainen
25.4.2012 19:17, vishy kirjoitti: Hi, I need to do spatial queries like find places within 5 miles of a location given in latitude and longitude. So, I am thinking of exploring PostGIS and GeoDjango. I have installed both. Now, I already have a database which has a table for places with

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
Yes, I just ran the 2 scripts in my current database - spatial_ref_sys.sql and postgis.sql. Seems to work. I am able to define a geometry column in my current existing table. On Apr 25, 11:03 pm, George Silva wrote: > Yes it can, as long PostGIS is installed. > > > > >

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
thanks On Apr 25, 11:07 pm, Jeff Heard wrote: > It can. I just usually consider it easier to create a new one > On Apr 25, 2012 1:38 PM, "vishy" wrote: > > > > > > > > > So, the existing database cannot be used as a postgis db? > > > On Apr

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
Thanks. On Apr 25, 11:07 pm, Jeff Heard wrote: > It can. I just usually consider it easier to create a new one > On Apr 25, 2012 1:38 PM, "vishy" wrote: > > > > > > > > > So, the existing database cannot be used as a postgis db? > > > On Apr

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread Jeff Heard
It can. I just usually consider it easier to create a new one On Apr 25, 2012 1:38 PM, "vishy" wrote: > So, the existing database cannot be used as a postgis db? > > On Apr 25, 9:21 pm, Jeff Heard wrote: > > Create a new spatial database and

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread George Silva
Yes it can, as long PostGIS is installed. On Wed, Apr 25, 2012 at 2:37 PM, vishy wrote: > So, the existing database cannot be used as a postgis db? > > On Apr 25, 9:21 pm, Jeff Heard wrote: > > Create a new spatial database and import the

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
So, the existing database cannot be used as a postgis db? On Apr 25, 9:21 pm, Jeff Heard wrote: > Create a new spatial database and import the data.  That's by far your > easiest option.  You'll need to create a POINT column (look at the PostGIS > doc on how to add

Re: Confused about GeoDjango and PostGIS

2012-04-25 Thread Jeff Heard
Create a new spatial database and import the data. That's by far your easiest option. You'll need to create a POINT column (look at the PostGIS doc on how to add spatial columns) and then add rows either using the ORM or with a spatial query including something like this as part of the insert:

Confused about GeoDjango and PostGIS

2012-04-25 Thread vishy
Hi, I need to do spatial queries like find places within 5 miles of a location given in latitude and longitude. So, I am thinking of exploring PostGIS and GeoDjango. I have installed both. Now, I already have a database which has a table for places with latitude and longitude. Can I enable this