Skip to content

Commit

Permalink
Merge pull request #1 from OSGeo/master
Browse files Browse the repository at this point in the history
rebase
  • Loading branch information
lucianpls authored May 5, 2018
2 parents 795a4d8 + 1b6785f commit a0a9f48
Show file tree
Hide file tree
Showing 35 changed files with 826 additions and 57 deletions.
2 changes: 1 addition & 1 deletion autotest/gcore/tiff_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -4743,7 +4743,7 @@ def tiff_write_117():

# Write first tile so that its byte count of that tile is 2048 (a multiple of 1024)
adjust = 1254
data = '0' * (65536 - adjust) + ''.join([('%c' % random.randint(0, 255)) for i in range(adjust)])
data = '0' * (65536 - adjust) + ''.join([('%c' % random.randint(0, 255)) for _ in range(adjust)])
ds.GetRasterBand(1).WriteRaster(0, 0, 256, 256, data)

# Second tile will be implicitly written at closing, or we could write
Expand Down
6 changes: 3 additions & 3 deletions autotest/gdrivers/netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,16 @@ def netcdf_setup():
# helper function needed so we can call Process() on it from netcdf_test_copy_timeout()


def netcdf_test_copy(ifile, band, checksum, ofile, opts=[], driver='NETCDF'):
def netcdf_test_copy(ifile, band, checksum, ofile, opts=None, driver='NETCDF'):
opts = [] if opts is None else opts
test = gdaltest.GDALTest('NETCDF', '../' + ifile, band, checksum, options=opts)
return test.testCreateCopy(check_gt=0, check_srs=0, new_filename=ofile, delete_copy=0, check_minmax=0)

###############################################################################
# test file copy, optional timeout arg


def netcdf_test_copy_timeout(ifile, band, checksum, ofile, opts=[], driver='NETCDF', timeout=None):
def netcdf_test_copy_timeout(ifile, band, checksum, ofile, opts=None, driver='NETCDF', timeout=None):

from multiprocessing import Process

Expand Down Expand Up @@ -1044,7 +1045,6 @@ def netcdf_25_nc4():
'valid_min': '10.1',
'valid_range_b': '1,10',
'valid_range_ub': '1,200',
'valid_range_s': '0,255',
'valid_range_us': '0,32000',
'valid_range_l': '0,255',
'valid_range_ul': '0,4000000000',
Expand Down
2 changes: 1 addition & 1 deletion autotest/gdrivers/netcdf_cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def netcdf_cf_setup():
# http method with curl, should use python module but easier for now
success = False
try:
(ret, err) = gdaltest.runexternal_out_and_err('curl')
gdaltest.runexternal_out_and_err('curl')
except OSError:
print('no curl executable')
else:
Expand Down
2 changes: 0 additions & 2 deletions autotest/gdrivers/netcdf_cfchecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ def checker(self, file):
print("\nCould not open file, please check that NetCDF is formatted correctly.\n".upper())
print("ERRORS detected:", 1)
raise
exit(1)

# if 'auto' version, check the CF version in the file
# if none found, use the default
Expand Down Expand Up @@ -2070,7 +2069,6 @@ def chk_FillValue(self, varName):
print("ValueError:", sys.exc_info()[1])
print("INFO: Could not complete tests on missing_value attribute")
raise
rc = 0

return rc

Expand Down
2 changes: 0 additions & 2 deletions autotest/gdrivers/nitf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1650,8 +1650,6 @@ def nitf_50():


def nitf_51():
import struct

for xsize in range(1, 9):
for nbpp in [1, 2, 3, 4, 5, 6, 7, 12]:
ds = gdal.GetDriverByName('NITF').Create('tmp/nitf51.ntf', xsize, 1)
Expand Down
6 changes: 3 additions & 3 deletions autotest/gdrivers/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ def pdf_jpeg_compression_rgb():
# Test RGBA


def pdf_rgba_default_compression(options_param=[]):

def pdf_rgba_default_compression(options_param=None):
options_param = [] if options_param is None else options_param
if gdaltest.pdf_drv is None:
return 'skip'

Expand Down Expand Up @@ -1057,7 +1057,7 @@ def pdf_set_5_gcps_ogc_bp(dpi=300):
[16., 18., 0, 0],
[16., 8., 0, 0]]

for i, gcpi in enumerate(gcp):
for i, _ in enumerate(gcp):
gcp[i][2] = src_gt[0] + gcp[i][0] * src_gt[1] + gcp[i][1] * src_gt[2]
gcp[i][3] = src_gt[3] + gcp[i][0] * src_gt[4] + gcp[i][1] * src_gt[5]

Expand Down
42 changes: 42 additions & 0 deletions autotest/ogr/data/insert-too-many-errors.dxf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
0
SECTION
2
HEADER
0
ENDSEC
0
BLOCKS
0
BLOCK
2
x
0
INSERT
71
7
0
unknown

-1
0
BLOCK
0
DIMENSION
0
INSERT
71
755
0
unknown

-1
0
BLOCK
2
0
0
DIMENSION
2
x
0
0
Loading

0 comments on commit a0a9f48

Please sign in to comment.