Loading .coveragerc 0 → 100644 +11 −0 Original line number Diff line number Diff line [run] source = autocnet [report] omit = fileio/ControlNetFileV0002_pb2.py exclude_lines = pragma: no cover def __repr__ raise AssertionError raise NotImplementedError if __name__ == __main__: .gitignore +64 −6 Original line number Diff line number Diff line #Py Files *.pyc #Vim *.swp #iPython /.ipynb* #PyCharm /.idea # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python env/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *,cover .hypothesis/ # Translations *.mo *.pot # Django stuff: *.log # Sphinx documentation docs/_build/ # PyBuilder target/ # Vim *.swp No newline at end of file README.rst +5 −2 Original line number Diff line number Diff line Loading @@ -5,8 +5,11 @@ AutoCNet .. image:: https://img.shields.io/pypi/v/autocnet.svg :target: https://pypi.python.org/pypi/autocnet .. image:: https://img.shields.io/travis/jlaura@usgs.gov/autocnet.svg :target: https://travis-ci.org/jlaura@usgs.gov/autocnet .. image:: https://travis-ci.org/USGS-Astrogeology/autocnet.svg?branch=master :target: https://travis-ci.org/USGS-Astrogeology/autocnet .. image:: https://coveralls.io/repos/USGS-Astrogeology/autocnet/badge.svg?branch=master&service=github :target: https://coveralls.io/github/USGS-Astrogeology/autocnet?branch=master .. image:: https://readthedocs.org/projects/autocnet/badge/?version=latest :target: https://readthedocs.org/projects/autocnet/?badge=latest Loading autocnet/__init__.py +1 −0 Original line number Diff line number Diff line __version__ = "0.1.0" autocnet/fileio/io_gdal.py +52 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,54 @@ for k, v in iter(NP2GDAL_CONVERSION.items()): GDAL2NP_CONVERSION[1] = 'int8' class GeoDataSet(object): """ Geospatial dataset object Parameters ---------- filename : str The path to the file Attributes ---------- basename : str The basename extracted from the full path geotransform : object OGR geotransformation object standardparallels : list of the standard parallels unittype : str Name of the unit, e.g. 'm' or 'ft' used by the raster spatialreference : object OSR spatial reference object geospatial_coordinate_system : object OSR geospatial coordinate reference object latlon_extent : list of tuples in the form (llat, llon), (ulat, ulon) extent : list of tuples in the form (minx, miny), (maxx, maxy) xpixelsize : float Size of the x-pixel ypixelsize : float Size of the y-pixel xrotation : float Rotation of the x-axis yrotation : float Rotation of the y-axis """ def __init__(self, filename): self.filename = filename self.ds = gdal.Open(filename) Loading Loading @@ -112,6 +160,10 @@ class GeoDataSet(object): @property def ypixelsize(self): """ The y-pixel size of the input data """ if not getattr(self, '_ypixelsize', None): self._ypixelsize = self.geotransform[5] return self._ypixelsize Loading Loading
.coveragerc 0 → 100644 +11 −0 Original line number Diff line number Diff line [run] source = autocnet [report] omit = fileio/ControlNetFileV0002_pb2.py exclude_lines = pragma: no cover def __repr__ raise AssertionError raise NotImplementedError if __name__ == __main__:
.gitignore +64 −6 Original line number Diff line number Diff line #Py Files *.pyc #Vim *.swp #iPython /.ipynb* #PyCharm /.idea # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python env/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *,cover .hypothesis/ # Translations *.mo *.pot # Django stuff: *.log # Sphinx documentation docs/_build/ # PyBuilder target/ # Vim *.swp No newline at end of file
README.rst +5 −2 Original line number Diff line number Diff line Loading @@ -5,8 +5,11 @@ AutoCNet .. image:: https://img.shields.io/pypi/v/autocnet.svg :target: https://pypi.python.org/pypi/autocnet .. image:: https://img.shields.io/travis/jlaura@usgs.gov/autocnet.svg :target: https://travis-ci.org/jlaura@usgs.gov/autocnet .. image:: https://travis-ci.org/USGS-Astrogeology/autocnet.svg?branch=master :target: https://travis-ci.org/USGS-Astrogeology/autocnet .. image:: https://coveralls.io/repos/USGS-Astrogeology/autocnet/badge.svg?branch=master&service=github :target: https://coveralls.io/github/USGS-Astrogeology/autocnet?branch=master .. image:: https://readthedocs.org/projects/autocnet/badge/?version=latest :target: https://readthedocs.org/projects/autocnet/?badge=latest Loading
autocnet/fileio/io_gdal.py +52 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,54 @@ for k, v in iter(NP2GDAL_CONVERSION.items()): GDAL2NP_CONVERSION[1] = 'int8' class GeoDataSet(object): """ Geospatial dataset object Parameters ---------- filename : str The path to the file Attributes ---------- basename : str The basename extracted from the full path geotransform : object OGR geotransformation object standardparallels : list of the standard parallels unittype : str Name of the unit, e.g. 'm' or 'ft' used by the raster spatialreference : object OSR spatial reference object geospatial_coordinate_system : object OSR geospatial coordinate reference object latlon_extent : list of tuples in the form (llat, llon), (ulat, ulon) extent : list of tuples in the form (minx, miny), (maxx, maxy) xpixelsize : float Size of the x-pixel ypixelsize : float Size of the y-pixel xrotation : float Rotation of the x-axis yrotation : float Rotation of the y-axis """ def __init__(self, filename): self.filename = filename self.ds = gdal.Open(filename) Loading Loading @@ -112,6 +160,10 @@ class GeoDataSet(object): @property def ypixelsize(self): """ The y-pixel size of the input data """ if not getattr(self, '_ypixelsize', None): self._ypixelsize = self.geotransform[5] return self._ypixelsize Loading