· 8 years ago · Jul 10, 2018, 07:40 PM
1raster2pgsql.exe -s 3424 -I -C -M R:DataLUCZ_2017ConservationPriorityAreasdatarastersabid -F -t 100x100 havdeel3 | psql -U postgres -d raster -h localhost -p 5432
2
3drop table if exists polys;
4create table polys as
5select st_polygon(rast)::geometry(multipolygon,3424) rast from havdeel3;
6
7ALTER TABLE polys ADD COLUMN id SERIAL PRIMARY KEY;
8
9drop table if exists raster_poly;
10create table raster_poly as
11select id,ST_AsRaster(rast, 50,50,'4BUI') rast from polys;
12
132018-07-10T15:03:35 WARNING :
142018-07-10T15:04:47 CRITICAL Layer is not valid : The layer dbname='scrap' host=localhost port=5432 user='postgres' password='--' sslmode=disable key='r_table_catalog' srid=3424 type=Polygon table="public"."raster_columns" (extent) sql= is not a valid layer and can not be added to the map. Reason:
152018-07-10T15:05:16 WARNING :
162018-07-10T15:11:18 WARNING :
172018-07-10T15:11:25 INFO : Connection to scrap was successful.
182018-07-10T15:12:37 WARNING :
192018-07-10T15:13:41 WARNING :
202018-07-10T15:17:27 WARNING :
212018-07-10T15:20:58 WARNING :