Re: Help with storing spatial (map coordinates) data?

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: Help with storing spatial (map coordinates) data?
Дата
Msg-id 448D0B01.5040407@wildenhain.de
обсуждение исходный текст
Ответ на Help with storing spatial (map coordinates) data?  (John Tregea <john@debraneys.com>)
Ответы Re: Help with storing spatial (map coordinates) data?  (John Tregea <john@debraneys.com>)
Список pgsql-general
John Tregea schrieb:
> Hi,
>
> I have recently switched to PostgreSQL and had no problem bringing our
> existing (my)SQL databases and data into the environment. I am now
> extending the functionality of our databases and want to start storing
> spatial information.
>
> The information is made up of latitude and longitude coordinates that
> define a point or location on the earth's surface. e.g. degrees, minutes
> and seconds north/south and degrees, minutes and seconds east/west.
>
> I have read up on custom data types (with input and output functions) in
> the docs but am not sure if that is the best way to go. Can anyone point
> me to a simple, workable implementation of storing and managing this
> type of data or advise me on how to structure a series of fields that
> could combine to the required string?

I'd suggest starting w/ the contrib package and its "cube" datatype.
This datatype maintains 3d-coordinates and has long/lat input
and output. In theory if its just storing you could also just store
the longitude, latitude in numeric fields. It really depends on
what you really want to do with that data in the database.
(e.g. what kind of searches you want to do) cube datatype for example
is indexable which really helps in search queries.

Regards
Tino Wildenhain

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

Предыдущее
От: John Tregea
Дата:
Сообщение: Help with storing spatial (map coordinates) data?
Следующее
От: "surabhi.ahuja"
Дата:
Сообщение: delete seems to be getting blocked