Re: Data type to store latitude and longitude

Поиск
Список
Период
Сортировка
От woodb@niwa.co.nz
Тема Re: Data type to store latitude and longitude
Дата
Msg-id 59731.192.168.57.128.1121292356.squirrel@secure.niwa.co.nz
обсуждение исходный текст
Ответ на Data type to store latitude and longitude  (MaRCeLO PeReiRA <gandalf_mp@yahoo.com.br>)
Список pgsql-general
> 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



В списке pgsql-general по дате отправления:

Предыдущее
От: Richard_D_Levine@raytheon.com
Дата:
Сообщение: Re: Standalone Parser for PL/pgSQL
Следующее
От: Gregory Youngblood
Дата:
Сообщение: Re: To Postgres or not