dem_common.DEFAULT_LIDAR_RES_METRES), default=dem_common.DEFAULT_LIDAR_RES_METRES, required=False) parser.add_argument('--projection', metavar='In Projection', help='Input projection (e.g., UTM30N)', default=None, required=False) parser.add_argument( '--method', metavar='Method', help='Software package to use. Options are:\n{}'.format(','.join( dem_lidar.LAS_TO_INTENSITY_METHODS)), default='GRASS', required=False) args = parser.parse_args() dem_lidar.las_to_intensity(args.lasfile[0], args.outintensity, resolution=args.resolution, projection=args.projection, method=args.method) except KeyboardInterrupt: sys.exit(2) except Exception as err: if DEBUG: raise dem_common_functions.ERROR(err) sys.exit(1)
dem_source = 'SRTM' # NEXTMap DEM elif args.nextmap: dem_source = 'NEXTMAP' else: dem_source = None # Set if hyperspectral bounds are to be used or lidar if args.lidar_bounds: use_lidar_bounds = True else: use_lidar_bounds = False if args.lidar_bounds and args.hyperspectral_bounds: dem_common_functions.ERROR( "Can't use '--lidar_bounds' and '--hyperspectral_bounds' together." ) sys.exit(1) in_lidar_projection = args.in_projection.upper() dem_lidar.lidar_utilities.create_patched_lidar_mosaic( args.lidarfiles, args.outdem, in_lidar_projection=in_lidar_projection, resolution=args.resolution, lidar_format=lidar_format, out_projection=args.out_projection, screenshot=args.screenshot, shaded_relief_screenshots=args.shadedrelief, out_raster_type=args.rastertype,