mirror of
https://github.com/rasterio/rasterio.git
synced 2025-12-08 17:36:12 +00:00
Merge branch 'maint-1.0'
This commit is contained in:
commit
4a569ba6a7
@ -15,14 +15,14 @@ env:
|
||||
- GDALVERSION="2.0.3"
|
||||
- GDALVERSION="2.1.4"
|
||||
- GDALVERSION="2.2.4"
|
||||
- GDALVERSION="2.3.2"
|
||||
- GDALVERSION="release/2.4"
|
||||
- GDALVERSION="2.3.3"
|
||||
- GDALVERSION="2.4.0"
|
||||
- GDALVERSION="master"
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- env: GDALVERSION="master"
|
||||
- env: GDALVERSION="release/2.4"
|
||||
- env: GDALVERSION="2.4.0"
|
||||
|
||||
addons:
|
||||
apt:
|
||||
@ -44,7 +44,7 @@ before_script: # configure a headless display to test matplotlib
|
||||
before_install:
|
||||
- python -m pip install -U pip
|
||||
- python -m pip install wheel
|
||||
- travis_wait . ./scripts/travis_gdal_install.sh
|
||||
- travis_wait 20 bash ./scripts/travis_gdal_install.sh
|
||||
- export PATH=$GDALINST/gdal-$GDALVERSION/bin:$PATH
|
||||
- export LD_LIBRARY_PATH=$GDALINST/gdal-$GDALVERSION/lib:$LD_LIBRARY_PATH
|
||||
install:
|
||||
|
||||
16
scripts/travis_gdal_install.sh
Normal file → Executable file
16
scripts/travis_gdal_install.sh
Normal file → Executable file
@ -3,8 +3,7 @@
|
||||
# originally contributed by @rbuffat to Toblerity/Fiona
|
||||
set -e
|
||||
|
||||
GDALOPTS=" --with-ogr \
|
||||
--with-geos \
|
||||
GDALOPTS=" --with-geos \
|
||||
--with-expat \
|
||||
--without-libtool \
|
||||
--with-libz=internal \
|
||||
@ -37,17 +36,15 @@ GDALOPTS=" --with-ogr \
|
||||
--without-odbc \
|
||||
--with-curl \
|
||||
--without-sqlite3 \
|
||||
--without-dwgdirect \
|
||||
--without-idb \
|
||||
--without-sde \
|
||||
--without-perl \
|
||||
--without-php \
|
||||
--without-ruby \
|
||||
--without-python"
|
||||
|
||||
PROJOPT="--with-proj"
|
||||
if [ "${GDALVERSION::1}" = "1" ]; then
|
||||
PROJOPT="--with-static-proj4=/usr/lib"
|
||||
PROJOPT="--with-static-proj4=/usr/lib";
|
||||
else
|
||||
PROJOPT="--with-proj";
|
||||
fi
|
||||
|
||||
# Create build dir if not exists
|
||||
@ -84,9 +81,10 @@ fi
|
||||
|
||||
if [ "$GDALVERSION" != "master" -a ! -d "$GDALINST/gdal-$GDALVERSION" ]; then
|
||||
cd $GDALBUILD
|
||||
wget http://download.osgeo.org/gdal/$GDALVERSION/gdal-$GDALVERSION.tar.gz
|
||||
gdalver=$(expr "$GDALVERSION" : '\([0-9]*.[0-9]*.[0-9]*\)')
|
||||
wget -q http://download.osgeo.org/gdal/$gdalver/gdal-$GDALVERSION.tar.gz
|
||||
tar -xzf gdal-$GDALVERSION.tar.gz
|
||||
cd gdal-$GDALVERSION
|
||||
cd gdal-$gdalver
|
||||
./configure --prefix=$GDALINST/gdal-$GDALVERSION $GDALOPTS $PROJOPT
|
||||
make -s -j 2
|
||||
make install
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import json
|
||||
import logging
|
||||
"""rasterio.warp module tests"""
|
||||
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
@ -28,7 +29,6 @@ from .conftest import requires_gdal22
|
||||
|
||||
|
||||
gdal_version = GDALVersion.runtime()
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
|
||||
DST_TRANSFORM = Affine(300.0, 0.0, -8789636.708, 0.0, -300.0, 2943560.235)
|
||||
@ -1492,3 +1492,17 @@ def test_issue_1076():
|
||||
resample=Resampling.nearest)
|
||||
|
||||
assert not (newarr == fill_value).all()
|
||||
|
||||
|
||||
def test_reproject_init_dest_nodata():
|
||||
"""No pixels should transfer over"""
|
||||
crs = CRS.from_epsg(4326)
|
||||
transform = Affine.identity()
|
||||
source = np.zeros((1, 100, 100))
|
||||
destination = np.ones((1, 100, 100))
|
||||
reproject(
|
||||
source, destination, src_crs=crs, src_transform=transform,
|
||||
dst_crs=crs, dst_transform=transform,
|
||||
src_nodata=0, init_dest_nodata=False
|
||||
)
|
||||
assert destination.all()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user