Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here is how you do that. You should read this from top to bottom.
    http://yum.pgsqlrpms.org/howtoyum.php
Also read this; you can safley skip sections on this page.
    http://www.postgresonline.com/journal/index.php?/archives/45-An-Almost-Idiots-Guide-to-PostgreSQL-YUM.html

And this is good too:
    http://postgis.refractions.net/docs/ch02.html

Did you do your reading?

OK, now we build postGIS.

Code Block
$ yum install postgresql-devel
$ tar xvfz postgis-1.3.1.tar.gz
$ cd postgis-1.3.1
$ ./configure \--with-pgsql=/usr/bin/pg_config \--with-geos=/usr/local/bin/geos-config \--with-proj=/usr/local
$ make
$ su
$ make install
$ exit

Errors I've seen:

error

Code Block
configure: error: Can't find 'flex'

...

Code Block
yum install flex

Errors I've seen:
error: 

Code Block
  configure: error: no acceptable C compiler found in $PATH

Solutionsolution:

Code Block
yum install gcc-c++

Errors I've seen:

error: 

Code Block
configure: error: readline library not found

Solutionsolution:

Code Block
yum install readline-devel.x86_64

Errors I've seen:
error: 

Code Block
configure: error: zlib library not found

Solutionsolution:

Code Block
yum install zlib.x86_64 zlib-devel.x86_64

...

Code Block
echo '/usr/local/lib' >> /etc/ld.so.conf.d/local-lib.conf
ldconfig

How do we know if everything is working properly?

First, follow the install instructions (which I may not have included herein - sorry!)

    http://postgis.refractions.net/docs/ch02.html#id2630100

Have the developers run the automated unit tests. But if your impatient I think the following should work...

...test proj4 by running this SQL

Code Block

    select asewkt(transform(GeomFromText('POINT(-122.4195 37.77767)', 4326), 900913))

If proj4 is installed and running properly you should see a couple of numbers reasonably close to these:

Code Block

6007068, 2111312

If not, you’ll get a SQL error.

To test geos run this sql (needs eas database to be restored):
todo: need some sql here that does not require a database

Code Block

    select *
    from
        address_base ab,
        addresses a
    where contains(
        st_transform(
            st_envelope(ST_GeomFromEWKT('SRID=4326;POLYGON((-122.42134 37.77179 0,-122.42134 37.77780 0,-122.41537 37.77780 0,-122.41537 37.77179 0,-122.42134 37.77179 0))')),
            2227
        ),
        ab.geometry
    )
    and ab.address_base_id = a.address_base_id
    limit 100;