from thatsDEM import pointcloud,vector_io,array_geometry,array_factory,grid from db import report import dhmqc_constants as constants from utils.osutils import ArgumentParser #If you want this script to be included in the test-suite use this subclass. Otherwise argparse.ArgumentParser will be the best choice :-) #path to geoid GEOID_GRID=os.path.join(os.path.dirname(__file__),"..","data","dkgeoid13b_utm32.tif") #The class(es) we want to look at... CUT_CLASS=constants.terrain #Default buffer size for cutlines (roads...) BUF=30 #TODO: migrate to new argparse setup progname=os.path.basename(__file__).replace(".pyc",".py") #a simple subclass of argparse,ArgumentParser which raises an exception in stead of using sys.exit if supplied with bad arguments... parser=ArgumentParser(description="Check for outliers for each node in 3d line features",prog=progname) db_group=parser.add_mutually_exclusive_group() db_group.add_argument("-use_local",action="store_true",help="Force use of local database for reporting.") db_group.add_argument("-schema",help="Specify schema for PostGis db.") parser.add_argument("-class",dest="cut_to",type=int,default=CUT_CLASS,help="Specify ground class for input las file (will use default defined in constants).") parser.add_argument("-id_attr",help="Specify id attribute to identify a line.") parser.add_argument("-toH",action="store_true",help="Warp the pointcloud from ellipsoidal heights to dvr90.") parser.add_argument("-zlim",type=float,default=1.0,help="Only report points that differ this much. Defaults to 1.0 m") parser.add_argument("-srad",type=float,default=2.0,help="Use this search radius when interpolating (idw) in pointcloud. Defaults to 2.0 m") parser.add_argument("-ndval",type=float,default=-999,help="Specify no-data value for line nodes (will be skipped). Defaults to -999") parser.add_argument("-debug",action="store_true",help="Turn on extra verbosity...") group = parser.add_mutually_exclusive_group() group.add_argument("-layername",help="Specify layername (e.g. for reference data in a database)") group.add_argument("-layersql",help="Specify sql-statement for layer selection (e.g. for reference data in a database)",type=str) parser.add_argument("las_file",help="input 1km las tile.") parser.add_argument("ref_data",help="Reference data (path, connection string etc).")
#z_tolerance z_tolerance = 1.0 #The class(es) we want to look at... CUT_CLASS = constants.terrain #The z-interval we want to consider for the input LAS-pointcloud... Z_MIN = -20 Z_MAX = 200 #Default buffer size for cutlines (roads...) BUF_SIZE = 3 #TODO: migrate to new argparse setup progname = os.path.basename(__file__).replace(".pyc", ".py") #a simple subclass of argparse,ArgumentParser which raises an exception in stead of using sys.exit if supplied with bad arguments... parser = ArgumentParser( description="Check accuracy relative to reference data pr. strip.", prog=progname) db_group = parser.add_mutually_exclusive_group() db_group.add_argument("-use_local", action="store_true", help="Force use of local database for reporting.") db_group.add_argument("-schema", help="Specify schema for PostGis db.") parser.add_argument( "-class", dest="cut_to", type=int, default=CUT_CLASS, help= "Specify ground class for input las file (will use default defined in constants)." ) parser.add_argument("-toE", action="store_true",