Skip to content

Commit

Permalink
License text added to all files
Browse files Browse the repository at this point in the history
  • Loading branch information
kbevers committed Apr 6, 2016
1 parent c1590f1 commit 4483346
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 18 deletions.
14 changes: 11 additions & 3 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Copyright (c) 2015, Kristian Evers

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Permission to use, copy, modify, and/or distribute this
software for any purpose with or without fee is hereby granted,
provided that the above copyright notice and this permission
notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
28 changes: 15 additions & 13 deletions kvadratnet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
"""Quadratic tile naming instpired by the danish 'Kvadratnet'.
# Permission to use, copy, modify, and/or distribute this
# software for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission
# notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
# THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
# CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF

"""Tiling scheme instpired by the danish 'Kvadratnet'.
Glossary:
Expand All @@ -22,19 +35,8 @@
Tile ordinate: One of the values in a set of tile coordinates.
UTM ordinate: One of the values in a set of UTM coordinates.
TODO:
Implement as an app and an API.
App:
knet tindex --zone=24 *.tif output.json
knet create 10km --bbox=[Nmin Nmax Emin Emax]
"""

from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
Expand Down
20 changes: 18 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
from nose.tools import *
# Permission to use, copy, modify, and/or distribute this
# software for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission
# notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
# THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
# CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
""""
Test suite for the kvadratnet module.
"""

from nose.tools import assert_raises, raises
import kvadratnet

class Testkvadratnet(object):
Expand All @@ -21,7 +37,7 @@ def test_reduce_ordinate(self):
kvadratnet._reduce_ordinate(6223700, '300m')

def test_enlarge_ordinate(self):
assert(kvadratnet._enlarge_ordinate(62237, '100m') == 6223700)
assert kvadratnet._enlarge_ordinate(62237, '100m') == 6223700
assert(kvadratnet._enlarge_ordinate(622375, '250m') == 6223750)
assert(kvadratnet._enlarge_ordinate(6432, '1km') == 6432000)
assert(kvadratnet._enlarge_ordinate(57, '10km') == 570000)
Expand Down

0 comments on commit 4483346

Please sign in to comment.