git-svn-id: https://svn.osgeo.org/grass/grass/trunk@37347 15284696-431f-4ddb-bdfa-cd5b030d7da7
@@ -31,7 +31,7 @@
import sys
import os
-import grass
+from grass.script import core as grass
def main():
layers = options['layers'].split(',')
@@ -56,7 +56,7 @@ import math
import atexit
import glob
import shutil
def cleanup():
grass.try_remove(tmp)
@@ -93,7 +93,7 @@
import math
+from grass.script import core, raster as grass
try:
import wxversion
@@ -71,7 +71,7 @@
def make_frame(f, b, t, l, r):
(ft, fb, fl, fr) = f
@@ -40,7 +40,7 @@
#%end
drape_map = options['drapemap']
@@ -47,7 +47,7 @@
import string
+from grass.script import core, db as grass
table = options['table']
@@ -36,7 +36,7 @@
+from grass.script import core, db, vector as grass
@@ -52,7 +52,7 @@
dsn = options['dsn']
@@ -55,7 +55,7 @@
input = options['input']
@@ -27,7 +27,7 @@
test_file = options['test']
@@ -35,7 +35,7 @@
def start_browser(entry):
path = os.path.join(gisbase, 'docs', 'html', entry + '.html')
@@ -84,7 +84,7 @@
global tmp
@@ -44,7 +44,7 @@
def copy_colors(fh, map, offset):
p = grass.pipe_command('r.colors.out', map = map)
vrt = """<VRTDataset rasterXSize="$XSIZE" rasterYSize="$YSIZE">
<SRS>GEOGCS["wgs84",DATUM["WGS_1984",SPHEROID["wgs84",6378137,298.257223563],TOWGS84[0.000,0.000,0.000]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]</SRS>
@@ -69,7 +69,7 @@
def get_percentile(map, percentile):
s = grass.read_command('r.univar', flags = 'ge', map = map, percentile = percentile)
@@ -76,7 +76,7 @@
bands = [1,2,3,4,5,7]
@@ -69,7 +69,7 @@ import sys
grass.try_remove('spectrum.gnuplot')
@@ -100,7 +100,7 @@
parms = [[( 0.3037, 0.2793, 0.4743, 0.5585, 0.5082, 0.1863),
(-0.2848,-0.2435,-0.5435, 0.7243, 0.0840,-0.1800),
@@ -89,7 +89,7 @@
@@ -53,7 +53,7 @@
first = options['first']
@@ -61,7 +61,7 @@ import sys
scales = {
'meters': 1.0,
@@ -56,7 +56,7 @@
# what to do in case of user break:
@@ -76,7 +76,7 @@ import sys
@@ -61,7 +61,7 @@
import platform
bands = {
'L1A': {
@@ -112,7 +112,7 @@ import sys
if not in_temp:
@@ -23,7 +23,7 @@
import subprocess
class GDALWarp:
def __init__(self, flags, options):
@@ -77,7 +77,7 @@ import os
path = os.path.join(os.getenv('GISBASE'), 'etc', 'r.in.wms')
sys.path.append(path)
@@ -177,7 +177,7 @@ import tempfile
import urllib
import xml.sax
wmsPath = os.path.join(os.getenv('GISBASE'), 'etc', 'r.in.wms')
sys.path.append(wmsPath)
@@ -19,7 +19,7 @@
class WMSDownload:
@@ -18,7 +18,7 @@
class WMSRequest:
@@ -43,7 +43,7 @@
@@ -46,7 +46,7 @@
# if no output filename, output to stdout
@@ -73,7 +73,7 @@ import sys
name = options['name']
@@ -54,7 +54,7 @@
infile = options['input']
shell = flags['g']
@@ -34,7 +34,7 @@
@@ -108,7 +108,7 @@
@@ -120,7 +120,7 @@ import subprocess
import tempfile
def bboxToPoints(bbox):
"""Make points that are the corners of a bounding box"""
#%End
env = grass.gisenv()
import re
+from grass.script import core, vector as grass
if options['option'] == 'add':
@@ -20,7 +20,7 @@
map = options['map']
@@ -51,7 +51,7 @@
@@ -50,7 +50,7 @@
force = flags['f']
@@ -64,7 +64,7 @@
old_database = options['old_database']
@@ -59,7 +59,7 @@ import sys
for ext in ['', '.sort']:
@@ -63,7 +63,7 @@
@@ -55,7 +55,7 @@ import sys
filename = options['file']
@@ -45,7 +45,7 @@
fileorig = options['file']
@@ -58,7 +58,7 @@ import atexit
import time
@@ -68,7 +68,7 @@
+from grass.script import core, raster, vector as grass
def has_column(vector, col):
return
def uniq(l):
result = []
grass.exec_command(