Changes between Initial Version and Version 1 of Processing/CreateImagePy


Ignore:
Timestamp:
Aug 8, 2014, 4:55:15 PM (10 years ago)
Author:
mark1
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Processing/CreateImagePy

    v1 v1  
     1= Createimage.py =
     2
     3This page documents some usage cases for the createimage.py script. This uses the grass_library.py and GDAL library to do image format transformations, mosaicing and overlaying of vectors, and bring all the functions into line with each other. It is used in the routine and operational ARSF processing scripts and libraries. It can be imported as a library if desired.
     4
     5== Help output ==
     6
     7usage: createimage.py [-h] [--input <path>] [--output <path>]
     8                      [--outputtype <keyword>] [--projection <proj string>]
     9                      [--bands <integer> <integer> <integer>]
     10                      [--datatype <keyword>] [--matchonly <keyword>]
     11                      [--strict] [--mosaic] [--vectors <path>]
     12                      [--vectortables <str> [<str> ...]]
     13                      [--lidarcolumn <integer>] [--resolution <integer>]
     14
     15optional arguments:
     16  -h, --help            show this help message and exit
     17  --input <path>, -i <path>
     18                        Input filename (GDAL supported filetype, LAS file) or
     19                        directory containing suitable files.
     20  --output <path>, -o <path>
     21                        Output filename or directory to write the files too.
     22  --outputtype <keyword>, -t <keyword>
     23                        String definition for the output image type - follows
     24                        gdal conventions. e.g. "GTiff", "JPEG" etc.
     25  --projection <proj string>, -p <proj string>
     26                        PROJ4 string describing the projection of the input
     27                        data
     28  --bands <integer> <integer> <integer>, -b <integer> <integer> <integer>
     29                        3 bands to use for image creation.
     30  --datatype <keyword>, -d <keyword>
     31                        String definition for the output data type - follows
     32                        gdal conventions. e.g. "Byte", "Int16" etc.
     33  --matchonly <keyword>, -m <keyword>
     34                        Only use matching filenames for given regex, e.g.
     35                        ^e.*$ only files starting with e
     36  --strict              For strict adhering to importing to correct
     37                        projection.
     38  --mosaic              To concatenate all input files into a single mosaiced
     39                        image
     40  --vectors <path>, -v <path>
     41                        Input vector filename (OGR supported filetype) or
     42                        directory containing suitable vector files.
     43  --vectortables <str> [<str> ...], -V <str> [<str> ...]
     44                        String descriptor of table name(s) to use from the
     45                        vector file.
     46  --lidarcolumn <integer>, -l <integer>
     47                        Column to use from ARSF-style ASCII lidar files for
     48                        import - default is 4 = intensity. Import from LAS
     49                        files use this too.
     50  --resolution <integer>, -r <integer>
     51                        Resolution of GRASS location to set for output image.
     52
     53
     54== Examples ==
     55
     56The following are a few examples that the script can be used to process.
     57
     58Create 3 band RGB quicklooks (JPEGS) from a directory of raw hyperspectral data:
     59
     60{{{
     61createimage.py --input hyperspectral/fenix/ --output myjpegs/
     62}}}
     63
     64Create specified 3 band Tiff images from mapped hyperspectral data:
     65
     66{{{
     67createimage.py --input processing/hyperspectral/flightlines/georeferencing/mapped/ --output  mytiffs/ --outputtype GTiff --bands 100 80 60
     68}}}
     69
     70
     71Mosaic mapped Fenix BIL images together and create a 3 band quicklook:
     72
     73{{{
     74createimage.py --input processing/hyperspectral/flightlines/georeferencing/mapped/ --output myjpegs/ --mosaic --matchonly ^f.*bil$
     75}}}
     76
     77Do the same overlaying vectors:
     78
     79{{{
     80createimage.py --input processing/hyperspectral/flightlines/georeferencing/mapped/ --output myjpegs/ --mosaic --matchonly ^f.*bil$ --vectors ../vector_data/
     81}}}
     82
     83Mosaic LiDAR lines and overlay vectors using only the BoundaryArea vector table
     84
     85{{{
     86createimage.py --input ascii/ --output quicklooks/ --projection UKBNG --vectors myvectordirectory/ --mosaic --vectortables BoundaryArea
     87}}}
     88