Commit 9812e779 authored by Hoek, Steven's avatar Hoek, Steven
Browse files

Few TODO comments added as well as a method called get_value

parent ec57b91b
......@@ -89,6 +89,7 @@ class AsciiGrid(GridEnvelope2D, Raster):
def readheader(self):
# Assume that the file is open; read header of the file and assign all attributes
if (self.datafile != None):
# TODO: make this case-insensitive!
if (not self.datafile.closed):
hl = self.datafile.readline();
self.ncols = int(hl.replace('ncols', ''));
......@@ -187,6 +188,7 @@ class AsciiGrid(GridEnvelope2D, Raster):
# We assume that exactly 1 row is included.
if (self.datatype == const.INTEGER):
# TODO deal with numpy arrays if necessary
for k in range(0, self.ncols):
s = str(sequence_with_data[k]).rjust(const.MAXDIGITSPERCELL + 1);
......@@ -209,4 +211,11 @@ class AsciiGrid(GridEnvelope2D, Raster):
if (self.__mode[0] == 'r'):
super(AsciiGrid, self).reset()
def get_value(self, i, k):
# Return the wanted value
for _ in range(0, i):
line =
return line[int(k)]
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment