Indexing of geometric data

Поиск
Список
Период
Сортировка
От Barry Brown
Тема Indexing of geometric data
Дата
Msg-id 20000705132950.M21476@ibexa.com
обсуждение исходный текст
Список pgsql-general
Greetings,

I'm investigating the use of PostgreSQL to maintain a database of
mapping data.  My dataset currently stored latitudes and longitudes as
fixed-precision integers (ie, 37.234 is stored as 37234) in separate
columns: one for latitude, one for longitude.

Postgres has geometric data types, such as point, line, etc, but I'm a
little leary of using them because of performance reasons.  For one, the
internal representation of a point is a pair of double-precision floating
point numbers.  For a dataset containing millions of points, working
with floats could be expensive, both in storage and computation costs.

Second, I want to be able to do queries like "find all line segments
(or points) that overlap or intersect with a given bounding box."  I'm
afraid that without an appropriate index on the set of data points, a
query like that will be extremely slow.

So my questions are: what data structure is used to index a set of points?
Is it a spatially-oriented structure, such as a quadtree, that would make
queries like the example above very fast?  Can Postgres be adapted to
use integers instead of floats to store point coordinates?

Thanks!

Barry

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Need help with error
Следующее
От: JanWieck@t-online.de (Jan Wieck)
Дата:
Сообщение: Re: PostgreSQL 7.1