| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
import argparse |
| 16 |
import jiplib as jl |
| 17 |
|
| 18 |
parser=argparse.ArgumentParser() |
| 19 |
parser.add_argument("-dx","--dx",help="spatial resolution in x (in m)",dest="dx",required=False,type=int,default=100) |
| 20 |
parser.add_argument("-dy","--dy",help="spatial resolution in y (in m)",dest="dy",required=False,type=int,default=100) |
| 21 |
args = parser.parse_args() |
| 22 |
|
| 23 |
ULX=600000.0 |
| 24 |
ULY=4000020.0 |
| 25 |
LRX=709800.0 |
| 26 |
LRY=3890220.0 |
| 27 |
projection='epsg:32612' |
| 28 |
dict={'ulx':ULX,'uly':ULY,'lrx':LRX,'lry':LRY,'a_srs':projection} |
| 29 |
dict.update({'otype':'GDT_UInt16'}) |
| 30 |
dict.update({'dy':args.dy,'dx':args.dx}) |
| 31 |
jim0=jl.createJim(**dict) |
| 32 |
if jim0.nrOfCol()!=1098: |
| 33 |
print("Failed: number of cols") |
| 34 |
if jim0.nrOfRow()!=1098: |
| 35 |
print("Failed: number of rows") |
| 36 |
else: |
| 37 |
print("Success: create georeferenced image") |
| 38 |
jim0.close() |
| 39 |
|