Compiling wktraster for PostGIS
jpglutting at gmail.com
Fri Apr 8 23:37:44 PDT 2011
I am trying to compile the wktraster extension for PostGIS 1.5.2, which I
have installed through MacPorts. I also downloaded and unzipped the source
code to /opt/local/src/postgis-1.5.2/
Wktraster is an extension that provides the same geometry interface as other
PostGIS features. It has been included in the official PostGIS project as of
version 2.0, and is now called "PostGIS Raster", but I need to use it now
with PostGIS 1.5.2. See http://trac.osgeo.org/postgis/wiki/WKTRaster
>From that page, the recommended way to install PostGIS Raster is to use the
KyngKaos binaries, which is not a bad option, but I don't want to switch
back and forth between systems unless I absolutely have to, and I have
already compiled PL/R into this installation of Postgres, so I don't want to
start over and have to figure that out again.
This is what I have done. I have the source for wktraster in the
/opt/local/src/wktraster directory. I have configured the install with
which works fine. I did this because I couldn't find the liblwgeom.h file
that wktraster needs anywhere on the system. "port install postgis" doesn't
seem to install this, and I can't figure out how to get it so leave the
source code on the system. This could be my big problem, and if anyone has
any general tips about compiling against the source of installed packages
with MacPorts, I would love to hear them. I haven't found anything much in
the documentation (I might have missed it).
I then run "make" on the configured wktraster source code, and I get this
*make -C rt_core*
*cc -g -O2 -fno-common -DPIC -Wall -Wmissing-prototypes
-I/opt/local/src/postgis-1.5.2/liblwgeom -I/opt/local/include -c -o
*In file included from rt_api.h:87,*
* from rt_api.c:33:*
../postgis_config.h: No such file or directory*
*make: *** [rt_api.o] Error 1*
*make: *** [corelib] Error 2*
This is where I started guessing. I tried configuring and making the postgis
source code in the /opt/local/src/postgis directory, hoping that would
create a postgis_config.h file, but it complains that it can't find the
libproj files (I tried --with-projdir=/opt/locl/share/proj and
but none of that works.
I downloaded the PROJ.4 source code, to try using that, but then it is
missing something different, and it seems like this will go on forever,
especially since I am just guessing at this point.
Any tips or suggestions welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the macports-users