#!/bin/sh

pushd $RECIPE_DIR/test_data/

# From @mhearne-usgs. See https://github.com/conda-forge/gdal-feedstock/issues/23#issue-144997326
proj4="+y_0=2400761.714982585 +lat_ts=-19.6097 +a=6378137.0 +proj=merc +units=m +b=6356752.3142 +lat_0=-19.6097 +x_0=-0.0 +lon_0=-70.7691"

gdalwarp -s_srs "+proj=latlong" -t_srs "$proj4" -of EHdr grid.asc grid.flt

# Test ISIS3/USGS driver `SetNoDataValue()` issue.
gdalinfo cropped.cub

# From @akorosov. See https://github.com/conda-forge/gdal-feedstock/issues/83
export CPL_ZIP_ENCODING=UTF-8
gdalinfo /vsizip/stere.zip/stere.tif

# Check shapefile read.
ogrinfo sites.shp
popd


set -ex



gdal_grid --version
gdal_rasterize --version
gdal_translate --version
gdaladdo --version
gdalenhance --version
gdalwarp --version
gdalinfo --formats
gdalinfo http://thredds.nersc.no/thredds/dodsC/greenpath/Model/topaz
conda inspect linkages -p $PREFIX gdal
conda inspect objects -p $PREFIX gdal
exit 0
