glidernet / ogn-python

A gateway with built-in database for the Open Glider Network (OGN)
http://glidernet.org
GNU Affero General Public License v3.0
17 stars 4 forks source link

postgis_raster extension not loaded #161

Open matburnham opened 2 years ago

matburnham commented 2 years ago

flask database init doesn't create extension postgis_raster so raster2pgsql fails:

$ raster2pgsql *.tif -s 4326 -d -M -C -I -F -t 25x25 public.elevation | psql -d ogn
Processing 1/4: 30N000E_20101117_gmted_mea075.tif
BEGIN
NOTICE:  table "elevation" does not exist, skipping
DROP TABLE
ERROR:  type "raster" does not exist
LINE 1: ...lic"."elevation" ("rid" serial PRIMARY KEY,"rast" raster,"fi...
                                                             ^
ERROR:  current transaction is aborted, commands ignored until end of transaction block
matburnham commented 2 years ago

Simple fix is to apply create extension postgis_raster manually, but it would be nicer if I didn't have to remember.

matburnham commented 2 years ago

Looks like sbrodehl@355158c29aa1e64bc5eae0afd28e38a5d40717ec fixes this.