Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I would like to save a forecast which is saved as geoTiffs into a postgresQL database. I've been able to import the rasters using:

raster2pgsql -s 0 -I -d tiff/field*.tiff -F public.latest | psql -d optigrid

THis gives me a table latest which looks like

rid  | rast  | filename
1      ...     field1.tiff
2      ...     field10.tiff

and so forth.

However I would like to add another column which stores the time the forecast, something like

rid  | rast  | filename      | forecast_date
1      ...     field1.tiff      2012-08-09
2      ...     field10.tiff     2012-08-10

Is this possible?

Thanks Matt

share|improve this question
add comment

1 Answer 1

Try with something like ALTER TABLE followed by UPDATE. I mean:

ALTER TABLE public.latest ADD COLUMN forecast_date date;

UPDATE TABLE public.latest SET forecast_date = (...)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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