16.2. Using Geometric Data Types
PostgreSQL providesa set of data types you can use for storing geometric information efficiently. These data types are included in PostgreSQL's core distribution and are widely used and admired by many people. In addition to the data types themselves, PostgreSQL provides an index structure based on R-trees, which are optimized for performing spatial searching.
PHP has a simple interface for generating graphics. To generate database-driven indexes, you can combine PostgreSQL and PHP. In this section you will see how to implement the “glue” between PHP and PostgreSQL.
The goal of the next example is to implement an application that extracts points from a database and displays them in an image. To store the points ...
Get PHP and PostgreSQL: Advanced Web Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.