The WKT PostGIS raster code is now part of PostGIS trunk. Quick install instructions (from PostGIS sources):
./configure –with-rastermakemake rt-allmake installmake rt-installcreatedb <your_database>createlang plpgsql <your_database>psql -f postgis/postgis.sql -d <your_database>psql -f spatial_ref_sys.sql -d <your_database>psql -f raster/rt_pg/rtpostgis.sql -d <your_database>
UPDATE 1 (2010-10-22): With the last release (r6095) it’s an easier process:
- ./configure –with-raster
- make
- make install
- createdb <your_database>
- createlang plpgsql <your_database>
- psql -U <your_user> -f postgis/postgis.sql -d <your_database>
- psql -U <your user> -f spatial_ref_sys.sql -d <your_database>
- psql -U <your user> -f raster/rt_pg/rtpostgis.sql -d <your_database>
In case your user requires a password, add -W as psql flag, and you’ll be prompted for the password. Further information in README.postgis and README.raster files.
And of course, I’m working on GDAL PostGIS Raster driver. I’ll add the new specifications ASAP.
UPDATE 2 (2010-10-21): New version of the driver committed to repository. Now its name is postgisraster, instead the old one: wktraster. Further information in the link above.
Advertisements
Thanks for enhancing my knowledge. Geomarketing was not aware about these changes but now you made me informative. Thanks a lot dear…
I am trying to install POSTGIS raster. When i do make, it builds successfully saying:
“PostGIS was built successfully. Ready to install.” But after this when i try try to check the installation using: make raster-check i get the following error:
make -C raster check
make[1]: Entering directory `/home/niket/Downloads/wktraster-0.1.6d/postgis/trunk/raster’
make -C test check
make[2]: Entering directory `/home/niket/Downloads/wktraster-0.1.6d/postgis/trunk/raster/test’
make -C core check
make[3]: Entering directory `/home/niket/Downloads/wktraster-0.1.6d/postgis/trunk/raster/test/core’
cc -g -O2 -fPIC -DPIC -Wall -Wmissing-prototypes -I../../rt_core -I/home/niket/Downloads/wktraster-0.1.6d/postgis/trunk/liblwgeom -I/usr/include/gdal -o testapi testapi.c -lm ../../rt_core/librtcore.a /home/niket/Downloads/wktraster-0.1.6d/postgis/trunk/liblwgeom/liblwgeom.a -L/usr/lib -lgdal1.7.0
testapi.c: In function ‘main’:
testapi.c:1061: error: ‘LWPOLY’ has no member named ‘SRID’
testapi.c:1061: error: ‘LWPOLY’ has no member named ‘SRID’
make[3]: *** [testapi] Error 1
make[3]: Leaving directory `/home/niket/Downloads/wktraster-0.1.6d/postgis/trunk/raster/test/core’
make[2]: *** [check] Error 2
make[2]: Leaving directory `/home/niket/Downloads/wktraster-0.1.6d/postgis/trunk/raster/test’
make[1]: *** [check] Error 2
make[1]: Leaving directory `/home/niket/Downloads/wktraster-0.1.6d/postgis/trunk/raster’
make: *** [raster-check] Error 2
niket@niket-laptop:~/Downloads/wktraster-0.1.6d/postgis/trunk$ make rt-all
make: *** No rule to make target `rt-all’. Stop.
niket@niket-laptop:~/Downloads/wktraster-0.1.6d/postgis/trunk$ make rt-all
make: *** No rule to make target `rt-all’. Stop.
.
Could you help me with this error.
Hi Niket,
That error was caused because the field “SRID” of the structure “LWPOLY” changed its name to “srid” in a commit 4 days ago. I didn’t realize on that, but I fixed it. Please, update to the most recent version on SVN, and many thanks for your report.
BTW, remember now you only need to execute:
./configure –with-raster
make
make install
Thanks Jorgearevalo,
It was really helpful, I could install postgisraster successfully now.
Hi Jorgearevalo,
I am not sure this is the right place for this problem.
With present version of postgisraster is it possible to derive a raster layer from vector layer? If yes, how? because there is no documentation on the same.
Any help is appreciated.
Thanks in advance.
Hi Niket,
The rasterization of a vector is something you currently can’t do with PostGIS Raster. It’s in our roadmap, for future versions. You can get further information here:
http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03#ObjectiveFV.02-Beingabletointersectvectorandrastertoproduceraster.
http://trac.osgeo.org/postgis/wiki/WKTRaster/PlanningAndFunding
Another way would be by using gdal_rasterize, but you’ll need writting support on the GDAL PostGIS Raster driver. It’s another of my TODO tasks (http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html)
Best regards
I’m new with lunix and I’m struggling to install postgis wkt raster on my lunix.if any one has step to install the raster please post for me thanks.
“Lunix” doesn’t exist. I guess you meant “Linux”.
As far as I know, there’s no precompiled binaries for all Linux distros, so you’ll have to download and compile the last PostGIS development snapshot (http://postgis.refractions.net/download/postgis-2.0.0SVN.tar.gz) and compile it following this post’s instructions.
thanks for the instruction,I’ve install postgis 1.5.2,gdal 1.8.0 and geos 3.2.1. please send me instruction to install postgis wkt raster on postgis 1.5.2.
You need PostGIS 2.0 in order to use PostGIS Raster. “WKT Raster” was the old name of the extension. This name was used before integrating it into PostGIS trunk.
So, you’ll have to install PostGIS 2.0. It can be installed with PostGIS 1.5.2 in the same machine without problems.
In case you’re using a Linux distro, you need to compile PostGIS 2.0 from sources following this post’s instructions. The PostGIS 2.0 sources can be downloaded from http://postgis.refractions.net/download/postgis-2.0.0SVN.tar.gz
In case you’re using Windows, you can install PostGIS 2.0 with PostGIS Raster following this other post’s instructions: http://gis4free.wordpress.com/2011/03/10/how-to-install-and-configure-postgis-raster-on-windows/
After doing that, you’ll have a PostgreSQL database enabled with PostGIS 2.0 and PostGIS Raster. You can then start using PostGIS Raster. Check the PostGIS Raster documentation at http://postgis.refractions.net/documentation/manual-svn/RT_reference.html
hi again
i’ve follow the step,i’ve created the Postgis145 database which work fine,but when im trying to execute the bellow commands:
psql -d Postgis145 -f postgis.sql
psql -d Postgis145 -f postgis_comments.sql
psql -d Postgis145 -f spatial_ref_sys.sql
psql -d Postgis145 -f rtpostgis.sql
psql -d Postgis145 -f raster_comments.sql
psql -d Postgis145 -f topology/topology.sql
psql -d Postgis145-f doc/topology_comments.sql
it give me error message ” no such file or directory” please advice thanks.
The psql “-f” option needs the path to the sql file you’re trying to load. Please pay attention to the fact that my original lines were like:
psql -U -f postgis/postgis.sql -d
psql -U -f spatial_ref_sys.sql -d
psql -U -f raster/rt_pg/rtpostgis.sql -d
For example, if you unzipped the postgis sources in /usr/src/postgis-2.0, then, the 3 files above are:
/usr/src/postgis-2.0/postgis/postgis.sql
/usr/src/postgis-2.0/spatial_ref_sys.sql
/usr/src/postgis-2.0/raster/rt_pg/rtpostgis.sql
These are the 3 SQL files needed. The rest are optional.