Commit b8f7fe0b authored by Daniel Scheffler's avatar Daniel Scheffler

Updated deprecated import statements. Merged branch Tests into master.

updated __version__ and __versionalias__
parent 7bc387a9
......@@ -2,8 +2,8 @@
__author__ = """Daniel Scheffler"""
__email__ = 'danschef@gfz-potsdam.de'
__version__ = '0.2.3'
__versionalias__ = 'v20170529.04'
__version__ = '0.2.4'
__versionalias__ = 'v20170609.01'
from .baseclasses import GeoArray
......
......@@ -24,20 +24,20 @@ except ImportError:
import gdalnumeric
from geopandas import GeoDataFrame, GeoSeries
from pandas import DataFrame
from py_tools_ds.ptds.convenience.object_oriented import alias_property
from py_tools_ds.ptds.geo.coord_calc import get_corner_coordinates
from py_tools_ds.ptds.geo.coord_grid import snap_bounds_to_pixGrid
from py_tools_ds.ptds.geo.coord_trafo import mapXY2imXY, imXY2mapXY, transform_any_prj, reproject_shapelyGeometry
from py_tools_ds.ptds.geo.projection import prj_equal, WKT2EPSG, EPSG2WKT
from py_tools_ds.ptds.geo.raster.conversion import raster2polygon
from py_tools_ds.ptds.geo.vector.topology \
from py_tools_ds.convenience.object_oriented import alias_property
from py_tools_ds.geo.coord_calc import get_corner_coordinates
from py_tools_ds.geo.coord_grid import snap_bounds_to_pixGrid
from py_tools_ds.geo.coord_trafo import mapXY2imXY, imXY2mapXY, transform_any_prj, reproject_shapelyGeometry
from py_tools_ds.geo.projection import prj_equal, WKT2EPSG, EPSG2WKT
from py_tools_ds.geo.raster.conversion import raster2polygon
from py_tools_ds.geo.vector.topology \
import get_footprint_polygon, polyVertices_outside_poly, fill_holes_within_poly
from py_tools_ds.ptds.geo.vector.geometry import boxObj
from py_tools_ds.ptds.io.raster.gdal import get_GDAL_ds_inmem
from py_tools_ds.ptds.numeric.array import find_noDataVal
from py_tools_ds.ptds.compatibility.python.exceptions \
from py_tools_ds.geo.vector.geometry import boxObj
from py_tools_ds.io.raster.gdal import get_GDAL_ds_inmem
from py_tools_ds.numeric.array import find_noDataVal
from py_tools_ds.compatibility.python.exceptions \
import TimeoutError as TimeoutError_comp, FileNotFoundError as FileNotFoundError_comp
from py_tools_ds.ptds.compatibility.gdal import get_gdal_func
from py_tools_ds.compatibility.gdal import get_gdal_func
# internal imports
from .subsetting import get_array_at_mapPos
......@@ -898,7 +898,7 @@ class GeoArray(object):
xdim, ydim = int(xdim), int(ydim)
if xdim or ydim or out_prj:
from py_tools_ds.ptds.geo.raster.reproject import warp_ndarray
from py_tools_ds.geo.raster.reproject import warp_ndarray
image2plot, gt, prj = warp_ndarray(image2plot, self.geotransform, self.projection,
out_XYdims=(xdim, ydim), in_nodata=nodataVal, out_nodata=nodataVal,
transformerOptions=transOpt, out_prj=out_prj, q=True)
......@@ -1282,7 +1282,7 @@ class GeoArray(object):
gt = (tgt_xygrid[0][0], tgt_xgsd, 0, max(tgt_xygrid[1]), 0, -tgt_ygsd)
xmin, ymin, xmax, ymax = snap_bounds_to_pixGrid(tgt_bounds, gt, roundAlg='on')
from py_tools_ds.ptds.geo.raster.reproject import warp_ndarray
from py_tools_ds.geo.raster.reproject import warp_ndarray
self.arr, self.gt, self.prj = \
warp_ndarray(self[:], self.gt, self.prj, tgt_prj,
out_gsd = (tgt_xgsd, tgt_ygsd),
......
......@@ -5,12 +5,12 @@ __author__='Daniel Scheffler'
import warnings
import numpy as np
from shapely.geometry import box, Polygon
from py_tools_ds.ptds.geo.coord_calc import get_corner_coordinates, calc_FullDataset_corner_positions
from py_tools_ds.ptds.geo.coord_grid import snap_bounds_to_pixGrid
from py_tools_ds.ptds.geo.coord_trafo import mapXY2imXY, transform_any_prj, imXY2mapXY
from py_tools_ds.ptds.geo.projection import prj_equal
from py_tools_ds.ptds.geo.vector.topology import get_overlap_polygon
from py_tools_ds.ptds.numeric.array import get_outFillZeroSaturated
from py_tools_ds.geo.coord_calc import get_corner_coordinates, calc_FullDataset_corner_positions
from py_tools_ds.geo.coord_grid import snap_bounds_to_pixGrid
from py_tools_ds.geo.coord_trafo import mapXY2imXY, transform_any_prj, imXY2mapXY
from py_tools_ds.geo.projection import prj_equal
from py_tools_ds.geo.vector.topology import get_overlap_polygon
from py_tools_ds.numeric.array import get_outFillZeroSaturated
......@@ -157,7 +157,7 @@ def get_array_at_mapPosOLD(arr, arr_gt, arr_prj, mapBounds, mapBounds_prj, band2
out_cols = int(abs((xmax - xmin) / arr_gt[1])) # FIXME using out_gt and outRowsCols is a workaround for not beeing able to pass output extent in the OUTPUT projection
# reproject temporary data to target projection (the projection of mapBounds)
from py_tools_ds.ptds.geo.raster.reproject import warp_ndarray
from py_tools_ds.geo.raster.reproject import warp_ndarray
out_arr, out_gt, out_prj = warp_ndarray(temp_arr, temp_gt, arr_prj, mapBounds_prj,
in_nodata=fillVal, out_nodata=fillVal, out_gt=out_gt,
outRowsCols=(out_rows, out_cols), outExtent_within=True,rsp_alg=0) # FIXME resampling alg
......@@ -210,7 +210,7 @@ def get_array_at_mapPos(arr, arr_gt, arr_prj, out_prj, mapBounds, mapBounds_prj=
arr = arr[:,:,band2get] if band2get else arr[:] # also converts GeoArray to numpy.ndarray
from py_tools_ds.ptds.geo.raster.reproject import warp_ndarray
from py_tools_ds.geo.raster.reproject import warp_ndarray
out_arr, out_gt, out_prj = \
warp_ndarray(arr, arr_gt, arr_prj, out_prj=out_prj, out_bounds=mapBounds, out_bounds_prj=mapBounds_prj,
in_nodata=fillVal, out_nodata=fillVal, rspAlg=rspAlg, out_gsd=out_gsd, progress=progress)
......
......@@ -20,7 +20,7 @@ test_requirements = [
setup(
name='geoarray',
version='0.2.3',
version='0.2.4',
description="Fast Python interface for geodata - either on disk or in memory.",
long_description=readme + '\n\n' + history,
author="Daniel Scheffler",
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment