#! /bin/sh

set -v

: ${GEODB:=geo}

touch /tmp/copy$$
chmod 777 /tmp/copy$$

monitor -c "destroy $1bin" $GEODB

monitor -c "copy $1 to \"/tmp/copy$$\"" $GEODB

monitor -c "create $1bin(name=char16,geo_pline=path,geo_bbox=box)" $GEODB

monitor -c "copy $1bin from \"/tmp/copy$$\"" $GEODB

/bin/rm /tmp/copy$$

monitor -c "define postquel function bindata ($1bin) returns char16 is retrieve (bindata=bin_path_out($1bin.geo_pline))" $GEODB
