Configuring PostGIS is almost as easy as the documentation makes it seem. I just had two hangups -
- I was skimming pretty quickly, so stupidly didn’t realize that the commands are from the command prompt instead of from the psql console.
- The location of the files postgis.sql and spatial_ref_sys.sql was not immediately obvious. Turns out they’re in /usr/share/postgresql/8.4/contrib/.
A quick SELECT postgis_full_version(); shows that I’m on the right version of PostGIS (1.4.0), but it looks like the GEOS & Proj4 libraries I compiled it against are pretty old (4.6 instead of 4.7 for Proj4; 3.0.2 instead of 3.2.0 for GEOS). On the other hand, the functions list in phppgadmin shows the function I was looking for (st_asgeojson), so I’m calling this one a success.