Error in pg_srgtools

Dear all,

I followed the instruction and set-up the postgres. I tried to generate the 100 surrogate. The program runs (please see the attached file), but shows some errors like

psql:./output/EUS4k_502x418/temp_files/100_create_wp_cty_cell.sql:9: ERROR: relation “public.wp_cty_cell_100_EUS4k” does not exist

I think I didn’t set-up something correct. I also attached the ‘surrogate_generation’ and ‘surrogate_specification’ files. Any comments or suggestions are welcome.

Hao

srg_EUS4k.txt (6.2 KB) surrogate_generation_pg.csv (7.8 KB) surrogate_specification_pg.csv (21.3 KB)

forgot to mention that. the ‘pg-srgtools’ was ok to generate the consu12 surrogate of 100 with the default code and surrogate inputs. I create my own Eastern US 4-km domain, and it should be something needs to be modified in these csv files, which caused the problem.

Hao

Did you import your new domain to database by modifying script generate_modeling_grid.sh under util directory?

For domain name in database, it better to use lower cases.

Thanks for these two comments. I changed the domain name to lower cases, and here is my ‘generate_modeling_grid.sh’ set-up.

######################################################################

‘EUS4k_502x418’

‘EUS4k’ 304000.000 -848000.000 4000.000 4000.000 502 418 1

tblname=‘eus4k’ # name of table in schema

proj=900921 # value of srid in spatial_ref_sys data table
xorig=304000 # x-coordinate of lower-left corner (LLC) of grid
yorig=-848000 # y-coordinate of LLC of grid
xcellsize=4000 # cell size in x-direction
ycellsize=4000 # cell size in y-direction
cols=502 # number of columns (x)
rows=418 # number of rows (y)