[postgis-users] Postgis raster tutorial

Jason Mathis jmathis at redzonesoftware.com
Thu Apr 17 12:17:02 PDT 2014


I am fairly new to postgis as well. I do not know of a way to rasterize into another table but just going through a similar project, I have a few ideas. 
Export the vector table using pgsql2shp.
Then rasterize the shape file using gdal_rasterize.
Finally import the raster file using raster2pgsql.
A bit of back and forth but its similar to what I am doing and there are several examples of each on the internet. 

Hope that help!

-jason 

On April 17, 2014 at 5:25:21 AM, georgew (gws293 at hotmail.com) wrote:

As a new raster user I have found it extremely difficult to come to grips  
with the task of creating a raster table with postgis, in particular from an  
existing vector table, a task which is really trivial when done with some  
existing s/w packages ( i.e. SAGA, GRASS etc..). Most of the examples I  
could find were based on the use of raster2pgsql which implies the prior  
existence of a raster file created with an external package, not on using  
postgis native capabilities to create such a raster. If you already have a  
raster file, postgis has no problem creating a table from it, but what if  
you don't? Should you be forced to use one of the external packages?  
The postgis manual has a total of two (2) examples on how to create a raster  
table with st_asraster, although there are ten (10) different variants. My  
point is not a criticism of postgis raster, at the contrary, a suggestion  
that it could be much more useful if properly explained to users not  
familiar with it. In other words a good postgis raster tutorial would go a  
long way to convince users to at least try postgis raster by itself without  
recourse to external packages (except perhaps for the visualisation of the  
rasters). Specifically, how to create with postgis a raster table from a  
vector table, how to extract values from one of the vector attributes and  
store them in the raster, resulting in a raster identical to what would have  
been created with raster2pgsql. I, with my ignorance of the topic, have not  
been able to do that yet.  
If such a tutorial has already appeared somewhere I would be delighted to be  
pointed in that direction.  
Many thanks  




--  
View this message in context: http://postgis.17.x6.nabble.com/Postgis-raster-tutorial-tp5006124.html  
Sent from the PostGIS - User mailing list archive at Nabble.com.  
_______________________________________________  
postgis-users mailing list  
postgis-users at lists.osgeo.org  
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users  

-- 
 

This transmission contains confidential and privileged information intended 
solely for the party identified above. If you receive this message in 
error, you must not use it or convey it to others. Please destroy it 
immediately and contact the sender at (303) 386-3955 or by return e-mail to 
the sender.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140417/f986f133/attachment.html>


More information about the postgis-users mailing list