#!/bin/bash
# This file is part of the PyOWS-WMS-Server package (= program).
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# author(s): Sebastian Holler
#
# Copyright (c)2008 by Sebastian Holler
# for document references, used in this source code: see
# use: get the projection (proj4 format)of the current location
# run this script in GRASS environment!!
# print projection information in PROJ.4 format (see: $ g.proj --help):
g.proj -j
#HACK: the output above doesn't print datum information:
if [ ! "$(g.proj -d | grep 'GRASS datum code:' | awk '{print $4}')" == "" ]; then
echo +datum=$(g.proj -d | grep "GRASS datum code:" | awk '{print $4}')
fi