Search Postgresql Archives

Re: Data type to store latitude and longitude

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi guys,
>
> Is there a data type to store data extracted from a
> GPS? The only thing I need is store latitude and
> longitude.
>
> Thanks in advance,
>


There are a few options,

Using basic Postgresql:
store the lats as +-90 & longs as 0-360 or +-180 numeric datatypes.
create a numeric array attribute with two values much as above
use the native Postgres point datatype (largely unsupported and I don't
know if it still exists in current versions)

Or as Tom suggested, use PostGIS to add OGC compliant geometric datatypes
including points, lines and polygons, an effective spatial index, as well
as a good set of spatial functions/operators to Postgresql.

I'd recomend the latter, also adding something like QGIS to add an Open
Source GIS (Geographic Information System) package which allows you to
plot and query PostGGIS tables as layers/themes in a desktop GIS.

Both should be OK in Linuz/Windows/Mac environments.... I've only used
them with Linux.

I have used PostGIS/QGIS with a system where a Perl script parsed &
inserted NMEA GPS data into a PostGIS table, if you are downloading data
as Garmin/Magellan or whatever exports, then you might find gpsbabel
useful.


Cheers,

  Brent Wood



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux