Debian Codegraph @

test/pytest_bb.py

raw symbols SCIP
1 ###############################################################################
2 # pytest_bb.py: Create a georeferenced image with bounding box
3 # Author(s): [email protected]
4 # Copyright (c) 2016-2019 European Union (Joint Research Centre)
5 # License EUPLv1.2
6 #
7 # This file is part of jiplib
8 ###############################################################################
9
10 # History
11 # 2017/10/23 - Created by Pieter Kempeneers ([email protected])
12 # Change log
13
14 import argparse
15 import jiplib as jl
16
17 parser=argparse.ArgumentParser()
18 parser.add_argument("-nrow","--nrow",help="Number of rows",dest="nrow",required=False,type=int,default=1098)
19 parser.add_argument("-ncol","--ncol",help="Number of cols",dest="ncol",required=False,type=int,default=1098)
20 args = parser.parse_args()
21
22 ULX=600000.0
23 ULY=4000020.0
24 LRX=709800.0
25 LRY=3890220.0
26 projection='epsg:32612'
27 dict={'ulx':ULX,'uly':ULY,'lrx':LRX,'lry':LRY,'a_srs':projection}
28 dict.update({'otype':'GDT_UInt16'})
29 dict.update({'nrow':args.nrow,'ncol':args.ncol})
30 jim0=jl.createJim(**dict)
31 if jim0.getDeltaX()!=100:
32 print("Failed: deltaX",jim0.getDeltaX())
33 if jim0.getDeltaY()!=100:
34 print("Failed: deltaY",jim0.getDeltaY())
35 else:
36 print("Success: create georeferenced image with bounding box")
37 jim0.close()
38