| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 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 |
|