EcohydroLib  1.29
Variables
RegisterStudyAreaShapefile Namespace Reference

Register shapefile into metadata store for a project directory, copying the source shapefile into the project directory in the process (if the source layer is not a shapefile, it will be converted on copy). More...

Variables

tuple parser = argparse.ArgumentParser(description='Register study area shapefile with project')
 
string help = 'The configuration file'
 
tuple args = parser.parse_args()
 
tuple cmdline = GenericMetadata.getCommandLine()
 
 configFile = None
 
tuple context = Context(args.projectDir, configFile)
 
 publisher = args.publisher
 
tuple inStudyAreaPath = os.path.abspath(args.studyAreaLayer)
 
tuple shpFilename = convertFeatureLayerToShapefile(context.config, context.projectDir, inStudyAreaPath, "studyarea", overwrite=args.overwrite)
 
tuple asset = AssetProvenance(GenericMetadata.MANIFEST_SECTION)
 

Detailed Description

Register shapefile into metadata store for a project directory, copying the source shapefile into the project directory in the process (if the source layer is not a shapefile, it will be converted on copy).

Study area will be projected to WGS84 GCS (EPSG:4326)

This software is provided free of charge under the New BSD License. Please see the following license information:

Copyright (c) 2013, University of North Carolina at Chapel Hill All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Author
Brian Miles brian.nosp@m._mil.nosp@m.es@un.nosp@m.c.ed.nosp@m.u

Pre conditions

None

Post conditions

  1. Will write the following entry(ies) to the manifest section of metadata associated with the project directory: study_area_shapefile
  2. Will write the following entry(ies) to the study area section of metadata associated with the project directory: bbox_wgs84

Usage:

1 python ./RegisterStudyAreaShapefile.py -p /path/to/project_dir -s /shapefile/to/register
Note
EcohydroLib configuration file must be specified by environmental variable 'ECOHYDROWORKFLOW_CFG', or -i option must be specified.

Variable Documentation

tuple RegisterStudyAreaShapefile.args = parser.parse_args()
tuple RegisterStudyAreaShapefile.asset = AssetProvenance(GenericMetadata.MANIFEST_SECTION)
tuple RegisterStudyAreaShapefile.cmdline = GenericMetadata.getCommandLine()
RegisterStudyAreaShapefile.configFile = None
tuple RegisterStudyAreaShapefile.context = Context(args.projectDir, configFile)
string RegisterStudyAreaShapefile.help = 'The configuration file'
tuple RegisterStudyAreaShapefile.inStudyAreaPath = os.path.abspath(args.studyAreaLayer)
tuple RegisterStudyAreaShapefile.parser = argparse.ArgumentParser(description='Register study area shapefile with project')
string RegisterStudyAreaShapefile.publisher = args.publisher
tuple RegisterStudyAreaShapefile.shpFilename = convertFeatureLayerToShapefile(context.config, context.projectDir, inStudyAreaPath, "studyarea", overwrite=args.overwrite)