Changes between Version 6 and Version 7 of UsersWikiBufferCoast


Ignore:
Timestamp:
Nov 27, 2012, 7:15:01 PM (11 years ago)
Author:
spluque
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiBufferCoast

    v6 v7  
    2929
    3030{{{
    31 COAST="newfoundland_subset_f.gmt"
     31COAST="newfoundland_subset_f"
    3232BUFOUT="newfoundland_subset_f_bufout"
    3333BUFIN="newfoundland_subset_f_bufin"
     
    3737TMPDIR=/var/tmp gmt_init_tmpdir
    3838
    39 ogr2ogr -f GMT ${COAST} \
    40     PG:"host=localhost user=username password=password dbname=gshhs" \
    41     ${COAST%%.gmt}
     39ogr2ogr -f GMT ${COAST}.gmt \
     40    PG:"host=localhost user=sluque password=otariidae dbname=gshhs" \
     41    ${COAST}
    4242for buf in ${BUFFERS[@]}; do
    4343    cat <<EOF > ${GMT_TMPDIR}/buffers.sql
    44     CREATE OR REPLACE VIEW ${COAST%%.gmt}_bufout AS
    45     SELECT gid, ST_Buffer(geom, ${buf}) FROM ${COAST%%.gmt};
    46     CREATE OR REPLACE VIEW ${COAST%%.gmt}_bufin AS
    47     SELECT gid, ST_Buffer(st_buffer, -${buf}) FROM ${COAST%%.gmt}_bufout;
     44    CREATE OR REPLACE VIEW ${COAST}_bufout AS
     45    SELECT gid, ST_Buffer(geom, ${buf}) FROM ${COAST};
     46    CREATE OR REPLACE VIEW ${COAST}_bufin AS
     47    SELECT gid, ST_Buffer(st_buffer, -${buf}) FROM ${COAST}_bufout;
    4848EOF
    4949    psql -f ${GMT_TMPDIR}/buffers.sql gshhs
    50     ogr2ogr -f GMT ${COAST%%.gmt}_bufout${buf}.gmt \
    51         PG:"host=localhost user=username password=password dbname=gshhs" \
    52         ${COAST%%.gmt}_bufout
    53     ogr2ogr -f GMT ${COAST%%.gmt}_bufin${buf}.gmt \
    54         PG:"host=localhost user=username password=password dbname=gshhs" \
    55         ${COAST%%.gmt}_bufin
     50    ogr2ogr -f GMT ${COAST}_bufout${buf}.gmt \
     51        PG:"host=localhost user=sluque password=otariidae dbname=gshhs" \
     52        ${COAST}_bufout
     53    ogr2ogr -f GMT ${COAST}_bufin${buf}.gmt \
     54        PG:"host=localhost user=sluque password=otariidae dbname=gshhs" \
     55        ${COAST}_bufin
    5656done
    5757