1

I did success query on a raster table in PostGIS (raster data clipped by a vector polygon), now I want to view the query result in QGIS. But how to export the query result to another table. In vector data, it's simple, just "CREATE TABLE schema.someTable AS (...sql in here...);

How about raster data? Any suggestion?

1

Alien,

That would work for raster as well. In addition, you'll probably want to call the http://postgis.net/docs/manual-2.1/RT_AddRasterConstraints.html

SELECT AddRasterConstraints('yournewtable'::name, 'rast'::name);

That will ensure all relevant info is properly exposed in raster_columns view.

0

Alternatively use INTO:

SELECT ...
INTO schema.table
FROM ...
WHERE ...

http://www.postgresql.org/docs/9.1/static/sql-selectinto.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.