EcohydroLib  1.29
Variables
GetBoundingboxFromStudyareaShapefile Namespace Reference

Get bounding box for ESRI Shapefile projected in WGS84 (EPSG:4326) More...

Variables

tuple parser = argparse.ArgumentParser(description='Get bounding box from study area shapefile')
 
string help = 'The directory to which metadata, intermediate, and final files should be saved'
 
tuple args = parser.parse_args()
 
tuple cmdline = GenericMetadata.getCommandLine()
 
tuple context = Context(args.projectDir, None)
 
float buffer = 0.01
 
tuple manifest = GenericMetadata.readManifestEntries(context)
 
list shapefileName = manifest['study_area_shapefile']
 
tuple shapefilePath = os.path.join(context.projectDir, shapefileName)
 
tuple bbox = getBoundingBoxForShapefile(shapefilePath, buffer=buffer)
 

Detailed Description

Get bounding box for ESRI Shapefile projected in WGS84 (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:

  1. The following metadata entry(ies) must be present in the manifest section of the metadata associated with the project directory: study_area_shapefile [the name of the of the study area shapefile]

Post conditions:

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

Usage:

1 GetBoundingboxFromStudyareaShapefile.py -p /path/to/project_dir

Variable Documentation

tuple GetBoundingboxFromStudyareaShapefile.args = parser.parse_args()
tuple GetBoundingboxFromStudyareaShapefile.bbox = getBoundingBoxForShapefile(shapefilePath, buffer=buffer)
tuple GetBoundingboxFromStudyareaShapefile.buffer = 0.01
tuple GetBoundingboxFromStudyareaShapefile.cmdline = GenericMetadata.getCommandLine()
tuple GetBoundingboxFromStudyareaShapefile.context = Context(args.projectDir, None)
string GetBoundingboxFromStudyareaShapefile.help = 'The directory to which metadata, intermediate, and final files should be saved'
tuple GetBoundingboxFromStudyareaShapefile.manifest = GenericMetadata.readManifestEntries(context)
tuple GetBoundingboxFromStudyareaShapefile.parser = argparse.ArgumentParser(description='Get bounding box from study area shapefile')
list GetBoundingboxFromStudyareaShapefile.shapefileName = manifest['study_area_shapefile']
tuple GetBoundingboxFromStudyareaShapefile.shapefilePath = os.path.join(context.projectDir, shapefileName)